protocol icon indicating copy to clipboard operation
protocol copied to clipboard

Parsing Accept header of newer Chrome fails

Open eikek opened this issue 5 years ago • 4 comments

Hi, from some Android device running Chrome 73, the following Accept header is sent

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3

The parser fails on the last v= part, saying expecting a q= instead:

Decoding of the request header failed: Headers/Accept/6: expected constant BitVector(16 bits, 0x713d) but got BitVector(16 bits, 0x763d)

I don't know what v= means. The user agent string is Mozilla/5.0 (Linux; Android 7.0; Lenovo TB-7304F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36 and I'm using protocol-http version 0.3.12.

eikek avatar Mar 29 '19 10:03 eikek

@eikek Hello there,

Sorry for a bit delayed response, I have found out the issue, and made a fix for it #57 , it should be merged in during next week (0.3.18-SNAPSHOT) and then by the end of the week we may do full release.

Hope it is fine.

AdamChlupacek avatar Apr 21 '19 17:04 AdamChlupacek

@AdamChlupacek Thank you! And no worries about delays.

eikek avatar Apr 22 '19 10:04 eikek

@eikek The snapshot is now released with this change, we are not doing full release yet as there is not enough changes from the last version yet, be free to use 0.3.18-SNAPSHOT, it is stable. We are using it in production as well.

AdamChlupacek avatar Apr 30 '19 09:04 AdamChlupacek

Thanks @AdamChlupacek ; I now created a workaround such that all headers that failed to parse are ignored (mapped to empty values). For my apps that is just fine.

eikek avatar Apr 30 '19 14:04 eikek