facebook/tornado — Issue #380: Resiliency to slightly non-RFC compliant HTTP requests
Author: mitchellh
Created: 2011-10-08 15:11:24+00:00
State: open

I recently ran into a bug with the Python standard library where a standard library was sending RFC non-compliant HTTP requests: http://bugs.python.org/issue13132

Despite being RFC non-compliant, the requests actually work in the following web servers:

* Apache2
* Nginx
* Twisted

I was attempting to write a lightweight cheese shop server using Tornado but this is currently blocking me since the request can't be parsed.

Despite not being compliant with the RFC, I think that web servers should do their best to serve any requests, just as web browsers do their best to serve malformed responses and markup. I propose that Tornado should handle the following separator cases for headers:

* `\r\n`
* `\n\n`
* `\n`

Mitchell