<h3>Description</h3>
<p>Current <code>parser_fline.c</code> is not supports HTTP/2 protocol and generates errors like below<br>
This is happens because <a href="https://github.com/kamailio/kamailio/blob/cfc89db53c087382c29d809dc0bc56f7351af2d1/src/core/parser/parse_fline.c#L102"><code>HTTP_VERSION</code></a> macro designed to work only with <a href="https://github.com/kamailio/kamailio/blob/cfc89db53c087382c29d809dc0bc56f7351af2d1/src/core/parser/parse_fline.h#L49"><code>HTTP/1.x</code></a> protocol.</p>
<h3>Expected behavior</h3>
<p>Response from <code>HTTP/2</code> enabled server is parsed without error.</p>
<h4>Actual observed behavior</h4>
<pre><code>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"}>
</code></pre>
<h4>Debugging Data</h4>
<p>None</p>
<h4>Log Messages</h4>
<p>None</p>
<h4>SIP Traffic</h4>
<p>None</p>
<h3>Possible Solutions</h3>
<p>Not know by me</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>/ # 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
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>/ # 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"
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1794">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZddBNHA5_OaS8PqU-WhbfAeh-8k3ks5vBL2rgaJpZM4Z1vUS">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZVe4HvwAD2wmOnCMi-YKYttmjBtzks5vBL2rgaJpZM4Z1vUS.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Wanted HTTP/2 parser (#1794)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1794"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1794",
"url": "https://github.com/kamailio/kamailio/issues/1794",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>