disconnect / apache-websocket

Apache WebSocket module
Apache License 2.0
196 stars 46 forks source link

Firefox compat #3

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hey !

I recently learn WebSocket and i made some test with my Apache HTTPD and Chromium. Works well. So, first, i thank you for this module !

But when my friend with Firefox cames on my webserver to test WebSocket echo, Apache log this : Oct 23 17:51:36 blastkiller-pc httpd[29998]: [error] [client 192.168.0.5] File does not exist: /home/www-data/www/websocket-echo

So i sniffed my network to see what happened and i found that Firefox sends this in header request : Connection: keep-alive, Upgrade

I check source, in function mod_websocket_method_handler !strcasecmp(connection, "Upgrade") Because of this line, mod_websocket drop this header, so I change to : strstr(connection, "Upgrade") and it works.

I'm not a good programmer so i don't know if this is the best solution. And i'm not a well english writer so sorry if i made some mistakes in my message !

Bye.

disconnect commented 12 years ago

Thanks for finding and investigating this. I have a fix that I will push tomorrow.