Welcome! Log In Create A New Profile

Advanced

Re: Whats is the correct message sequence for nginx server?

Maxim Dounin
October 23, 2013 05:30PM
Hello!

On Wed, Oct 23, 2013 at 02:15:48PM -0400, hemant_psu wrote:

> I am running nginx-1.5 server and sending chrome browser simple websocket
> request. My nginx server is confgiured with hello module which is supposed
> to send "Hello world" in response.
>
> As per RFC for websocket, a sever is supposed to send "switching protocol
> message "as ACK for connection upgrade request message.
> In my wireshark capture, I do see connection upgrade request message but in
> response, I see HTTP 1.1 200 0K message with "Hello World"
> text on data portion of HTTP payload.
>
> I am confused in terms of response, thinking my nginx server should have
> first sent connection upgrade response acknowledgement before responding
> with text data. Can anyone please suggest the right behaviour of nginx
> server when it gets a Connection upgrade request message.

You can't make an arbitrary nginx module to talk via WebSocket
protocol, this isn't going to work.

What you can is to use nginx to proxy WebSocket connections to
some WebSocket backend server using proxy_pass, as documented
here:

http://nginx.org/en/docs/http/websocket.html

Note that you need an actual backend server handling WebSocket
connections for proxying to work.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Whats is the correct message sequence for nginx server?

hemant_psu October 23, 2013 02:15PM

Re: Whats is the correct message sequence for nginx server?

Maxim Dounin October 23, 2013 05:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready