-
Notifications
You must be signed in to change notification settings - Fork 181
Closed
Description
I just had an application show an unexpected error because request.method was ''. A bit of debugging reveals the culprit to be a non-HTTP request coming in with this first line:
GET /info?txtAirPlay&txtRAOP RTSP/1.0
When waitress receives that request and tries to parse it calls waitress.parse.crack_first_line. That sees the line does not claim to be HTTP and aborts:
>>> from waitress.parser import *
>>> crack_first_line('GET /info?txtAirPlay&txtRAOP RTSP/1.0')
('', '', '')
Waitress does proceed to treat this as a normal HTTP request and sends it down the WSGI stack. I'm not sure what the best behaviour is. I can see a few options:
- Keep the current behaviour.
- Abort processing for non-HTTP requests
- Try to be less strict when parsing the first line and treat this as a GET request, with protocol set to RTSP/1.0 (does the wsgi environ have a protocol field?)
Metadata
Metadata
Assignees
Labels
No labels