Opened 13 years ago

Closed 13 years ago

#436 closed defect (invalid)

After authentication with auth I get a 401 timeut on socket proxy

Reported by: johannes amorosa Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.3.x
Keywords: Cc:
uname -a: Linux hpl 3.2.0-56-generic #86-Ubuntu SMP Wed Oct 23 09:20:45 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.5.6

Description

I use nginx as a ssl proxy with a meteor/node.js app
Site is still in development so I added a password to server block in nginx

auth_basic "Restricted";
auth_basic_user_file /path/to/bla;

After login I get in the Chrome console:
WebSocket connection to 'wss://my.domain/sockjs/517/i_pzq4lx/websocket' failed: Unexpected response code: 401

These errors go away when I delete the authentication. Is this a bug?
Joe

Change History (1)

comment:1 by Maxim Dounin, 13 years ago

Resolution: → invalid
Status: new → closed

This is a bug, but not in nginx. As per configuration and HTTP protocol, nginx responds with "401 Authentication required" to a request without auth credentials (also outlined in the WebSocket protocol specification, ​RFC6455). Your browser can't handle this though, and reports an error.

Relevant issue in Chrome's issue tracker seems to be already ​here.

Note: See TracTickets for help on using tickets.