How to force origin header to be used

#1

I’m writing an Autobahn websocket client which tries to connect to a lighttpd server with mod_websocket. The server rejects the handshake with a 400 Bad Request error.

As near as I can tell from looking at the mod_websocket source, it expects all clients to send an Origin: header, which autobahn doesn’t do. Is there a way to force autobahn to send an Origin: header?

Thanks

Joe

0 Likes

#2

Found the parameter to the protocol constructor, don’t know how I missed it. Sorry for the noise.

···

On Tuesday, July 23, 2013 1:57:31 PM UTC-5, jhal...@gmail.com wrote:

I’m writing an Autobahn websocket client which tries to connect to a lighttpd server with mod_websocket. The server rejects the handshake with a 400 Bad Request error.

As near as I can tell from looking at the mod_websocket source, it expects all clients to send an Origin: header, which autobahn doesn’t do. Is there a way to force autobahn to send an Origin: header?

Thanks

Joe

0 Likes

#3

I’m struggling with a similar issue, can you please let us know how you achieved this?

···

On Tuesday, 23 July 2013 19:57:31 UTC+1, jhal...@gmail.com wrote:

I’m writing an Autobahn websocket client which tries to connect to a lighttpd server with mod_websocket. The server rejects the handshake with a 400 Bad Request error.

As near as I can tell from looking at the mod_websocket source, it expects all clients to send an Origin: header, which autobahn doesn’t do. Is there a way to force autobahn to send an Origin: header?

Thanks

Joe

0 Likes

#4

Hi Chris,

The constructor of WebSocketClientFactory has an "origin" parameter for this. You can find the API docs are at http://autobahn.ws/python/reference

/Tobias

···

Am 20.08.2013 13:15, schrieb Chris Jeffery:

I'm struggling with a similar issue, can you please let us know how you
achieved this?

On Tuesday, 23 July 2013 19:57:31 UTC+1, jhal...@gmail.com wrote:

    I'm writing an Autobahn websocket client which tries to connect to a
    lighttpd server with mod_websocket. The server rejects the handshake
    with a 400 Bad Request error.

    As near as I can tell from looking at the mod_websocket source, it
    expects all clients to send an Origin: header, which autobahn
    doesn't do. Is there a way to force autobahn to send an Origin: header?

    Thanks

    Joe

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Likes

#5

Hi Tobias,

I may have the same problem but I want to use the Autobahn Android version. I cannot find any way of working around this issue with lighttdp and the “origin” parameter. Is there any way?

Thanks in advance for your help,
Javier

···

El martes, 20 de agosto de 2013 12:48:51 UTC+1, Tobias Oberstein escribió:

Hi Chris,

The constructor of WebSocketClientFactory has an “origin” parameter for
this. You can find the API docs are at http://autobahn.ws/python/reference

/Tobias

Am 20.08.2013 13:15, schrieb Chris Jeffery:

I’m struggling with a similar issue, can you please let us know how you

achieved this?

On Tuesday, 23 July 2013 19:57:31 UTC+1, jhal...@gmail.com wrote:

I'm writing an Autobahn websocket client which tries to connect to a
lighttpd server with mod_websocket. The server rejects the handshake
with a 400 Bad Request error.
As near as I can tell from looking at the mod_websocket source, it
expects all clients to send an Origin: header, which autobahn
doesn't do. Is there a way to force autobahn to send an Origin: header?
Thanks
Joe

You received this message because you are subscribed to the Google

Groups “Autobahn” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to autobahnws+...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

0 Likes