alfonsodg / demo-web2py

Apache License 2.0
0 stars 0 forks source link

Requests associated with Flash cause an exception #59

Closed alfonsodg closed 10 years ago

alfonsodg commented 10 years ago

From haima...@gmail.com on October 26, 2009 05:45:47

I use Uploadify, a JS script to upload mutiple files, which calls a Flash script. The request is rejected by the Web2py server.

I made it to work by patching gluon/wsgiserver.py:

        if not line.endswith(CRLF):
            raise ValueError("HTTP requires CRLF terminators")

was changed to

        if not line.endswith(CRLF):
            line += CRLF
            ###raise ValueError("HTTP requires CRLF terminators")

Of course, I am not too happy to modify core Web2py source.

OS is Ubuntu 9.10 but the problem occurs also on the real server regardless of the browser in use.

Web2py version is 1307 (but it is there for quite some time). It used to work in the past without the patch. I am not sure what might have changed, may be a Flash upgrade?

Original issue: http://code.google.com/p/web2py/issues/detail?id=60

alfonsodg commented 10 years ago

From massimod...@gmail.com on October 26, 2009 06:11:47

This is not a web2py bug a Flash bug or a bug in the Flash script calling web2py. The line in question checked for well-formed http-requests. Removing the check may cause security vulnerabilities. The wsgiserver is the cherrypy wsgiserver which we include unmodified. You may want to consider discussing the issue with the cherrypy team. You may also want to try using the Sneaky web server that comes with web2py.

Status: Invalid