code 400, message Bad request syntax ('\x88\x80\xa32\xc9\x98')

Rushikesh J picture Rushikesh J · Dec 4, 2015 · Viewed 7k times · Source

noVNC websocket log shows above message on an authentication event. The authentication is always failing and noVNC is reporting subject error.

Some times the error comes as code 400, message Bad HTTP/0.9 request type ('\x88\x8fR\x80\x19\x98QhM\xf9')

Is ('\x88\x80\xa32\xc9\x98') an ASCII or UTF-8 ? How to read and understand this message ?

Background : CentOS 5 / Python 2.4.3 / noVNC

Answer

Ciprian Tomoiagă picture Ciprian Tomoiagă · Aug 22, 2017

It seems this was a bug on websockify's side. It is fixed now, but they didn't make a release that includes the fix, so you have to use the master branch if you want to benefit from it.

Alternatively, you could just add the relevant line from that pull request to the file websockify/websocket.py.