### Description Current `parser_fline.c` is not supports HTTP/2 protocol and generates errors like below This is happens because [`HTTP_VERSION`](https://github.com/kamailio/kamailio/blob/cfc89db53c087382c29d809dc0bc56f735...) macro designed to work only with [`HTTP/1.x`](https://github.com/kamailio/kamailio/blob/cfc89db53c087382c29d809dc0bc56f735...) protocol.
### Expected behavior Response from `HTTP/2` enabled server is parsed without error.
#### Actual observed behavior ``` 246(251) ERROR: <core> [core/parser/parse_fline.c:257]: parse_first_line(): parse_first_line: bad message (offset: 11) 246(251) ERROR: <core> [core/parser/msg_parser.c:675]: parse_msg(): ERROR: parse_msg: message=<HTTP/2 200 date: Tue, 08 Jan 2019 15:12:16 GMT content-type: text/html; charset=UTF-8 server: Apache/2.4.37 (Amazon) OpenSSL/1.0.2k-fips PHP/7.2.11 cache-control: no-transform,public,max-age=300,s-maxage=900, no-cache, private set-cookie: laravel_session=eyJpdiI6ImZGbU96ajZPV2lkVGZLeHJFNlwvNEJ3PT0iLCJ2YWx1ZSI6IjZmdWdLT0JNNUNFU1ppRWtOTVlmTVphaG4yM25ZcHFWUmUrdlhpMXlYZ2dKK3NYT3JmeG82MkNrSW9VZHdhRkgiLCJtYWMiOiI5MmI1ZWY1YWY1ZDQ3N2Q5ZGMyNzY2OGM2M2ZmNGNlNmY1MGRmYzcyMDhkZTFjM2ZkOTFjMWJlNTRkZmM3MmJkIn0%3D; expires=Tue, 08-Jan-2019 18:12:16 GMT; Max-Age=10800; path=/; httponly access-control-allow-headers: origin, x-requested-with, content-type access-control-allow-methods: PUT, GET, POST, DELETE, OPTIONS
{"type":"registration_update","error_code":200,"text_description":"registration_update request succedded","call_id":"FrrQl6Dp~l"}> ```
#### Debugging Data None
#### Log Messages None
#### SIP Traffic None
### Possible Solutions Not know by me
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` / # kamailio -v version: kamailio 5.1.6 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 03:24:34 Nov 23 2018 with gcc 8.2.0 ```
* **Operating System**: ``` / # cat /etc/os-release NAME="Alpine Linux" ID=alpine VERSION_ID=3.8.0 PRETTY_NAME="Alpine Linux v3.8" HOME_URL="http://alpinelinux.org" BUG_REPORT_URL="http://bugs.alpinelinux.org" ```
Where would this be needed? Is kamailio making an HTTP/2 request with some module and getting a response in the case you pasted above?
I asynchronously report registration info to application server. ``` loadmodule "jansson.so" loadmodule "http_async_client.so" loadmodule "http_client.so" modparam("http_client", "httpredirect", 0) modparam("http_client", "useragent", "E-CSCF") modparam("http_client", "maxdatasize", 64535) modparam("http_client", "connection_timeout", 2) modparam("http_client", "tlsversion", 6) modparam("http_client", "keep_connections", 1) modparam("http_client", "httpcon", "lisendpoint=>https://example.com/LIS")
# Sending regisration info to LIS server route[SEND_REGISTRATION_TO_LIS] { xlog("L_ALERT","DEBUG: Sending registration info to LIS for $fu\n"); $var(payload)='{}'; $var(json_request)='{}'; jansson_set("string", "call_id", $ci, "$var(payload)"); jansson_set("integer", "msg_timestamp", $Ts, "$var(payload)"); jansson_set("integer", "expires", $xavp(ulrcd[0]=>expires), "$var(payload)"); jansson_set("string", "network_address", $si, "$var(payload)"); jansson_set("integer", "network_port", $sp, "$var(payload)"); jansson_set("string", "from", $fu, "$var(payload)"); jansson_set("string", "user_agent", $ua, "$var(payload)"); jansson_set("string", "contact", $ct, "$var(payload)"); jansson_set("obj", "registration_update", "$var(payload)", "$var(json_request)"); $http_req(suspend) = 0; $http_req(hdr) = "Content-Type: application/json"; $http_req(body) = $var(json_request);
http_async_query("LIS_URL", "LIS_REPLY"); }
route[LIS_REPLY] { if ($http_ok) { xlog("L_INFO", "route[HTTP_REPLY]: status $http_rs\n"); xlog("L_INFO", "route[HTTP_REPLY]: body $http_rb\n"); } else { xlog("L_INFO", "route[HTTP_REPLY]: error $http_err)\n"); } } ```
Think this issue of Amazon ELB. According [RFC7540](https://tools.ietf.org/html/rfc7540#section-8.1.3) examples server must return HTTP protocol version same as request. * Request ``` POST /resource HTTP/1.1 ``` Responce must be ``` HTTP/1.1 200 OK ``` Amazon returns ``` HTTP/2 200 ``` Wrong version and `OK` is not present. I will close ticket.
Closed #1794.