Thanks very much for writing (and sharing) your websockets code! I'm using it in a project I've been working on to get to know OCaml. Unfortunately, the web server I'm connecting to wants some additional headers on the original HTTP request.
This patch adds the ability to pass a list of additional headers to the server at connection establishment. Accomplishing this seemed pretty straightforward except in the case of a collision between the additional headers and the headers that the websockets module uses. I don't think this case should ever crop up in reality, but I had to handle it somehow so I let the additional headers overwrite the module's.
I hope you like the patch. I'd be happy to revise it in any way you'd like.
Hi,
Thanks very much for writing (and sharing) your websockets code! I'm using it in a project I've been working on to get to know OCaml. Unfortunately, the web server I'm connecting to wants some additional headers on the original HTTP request.
This patch adds the ability to pass a list of additional headers to the server at connection establishment. Accomplishing this seemed pretty straightforward except in the case of a collision between the additional headers and the headers that the websockets module uses. I don't think this case should ever crop up in reality, but I had to handle it somehow so I let the additional headers overwrite the module's.
I hope you like the patch. I'd be happy to revise it in any way you'd like.
Thanks Andy