Closed zoggy closed 9 years ago
On 18/06/2015 19:51, Zoggy wrote:
If I remove this condition, then the connection with Firefox works. By printing the contents of the "connection" headers, Firefox sends |keep-alive, Upgrade|, while Chrome only send |Upgrade|, thus explaining why the condition fails with Firefox. Maybe splitting the string on commas and testing each element of the resulting list would be more robust ?
Ahhh right this is actually a regression, somebody sent a patch for this earlier.
I don't understand though, I thought that get_multi would return a list of headers, and trying to find upgrade in this list would be enough.
I need to have a closer look at what get_multi actually do.
Vincent
Could you make a PR and a test for this ? I would do it, but I don't know how you make firefox connect to websocket.
And then I'll make a new release :)
Ok :-)
Thanks. But IMO this should be done by Cohttp, and I'm sure it is a bug there. Let me investigate on Cohttp's side first!
No problem. I took a look at cohttp and it seems to handle lists in case the headers contains several times the same header.
On 19/06/2015 09:26, Zoggy wrote:
No problem. I took a look at cohttp and it seems to handle lists in case the headers contains several times the same header.
Yeah but there is definitely a bug there, they don't parse correctly the headers, they don't split on ',' at all.
cc @avsm @rgrinberg
I'm fixing this.
Vincent
Can you check if my latest commit fixes this issue ?
Yes !
Is there a Cohttp bug on this one?
@avsm No, there is not.
@zoggy: Yes you can check or yes it solves the problem ? ;)
Sorry, yes it works ;)
Ok, great!
Firefox fails to connect via websocket, while chrome succeeds. I could track the problem down to this condition in
websocket_lwt.ml
, in functionestablish_server
:If I remove this condition, then the connection with Firefox works. By printing the contents of the "connection" headers, Firefox sends
keep-alive, Upgrade
, while Chrome only sendUpgrade
, thus explaining why the condition fails with Firefox. Maybe splitting the string on commas and testing each element of the resulting list would be more robust ?