> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Using the following simple code:
>
> import uwsgi
>
> def KV55(environ, start_response):
> response = environ['wsgi.input'].read(int(environ['CONTENT_LENGTH']))
> start_response('200 OK', [('Content-Type', 'text/xml'),
> ('Content-length', str(len(response)))])
> yield response
>
> uwsgi.applications = {'':KV55}
>
>
> I am getting a one second penalty timeout because I am reading the
> wsgi.input.
>
> To test this I am using:
>
> uwsgi --http 127.0.0.1:8181 -w simple
> curl -X POST -T kv55.xml http://127.0.0.1:8181
>
> uwsgi gives me:
>
> [pid: 6625|app: 0|req: 1/1] 127.0.0.1 () {30 vars in 400 bytes} [Tue
> Jan 24 02:46:41 2012] POST /kv55.xml => generated 3935 bytes in 1001
> msecs (HTTP/1.1 200) 2 headers in 65 bytes (1 switches on core 0)
Curl uses
Expect: 100-continue
when uploading files. It waits 1 sec for the server accepting it, and then
it sends data.
The uWSGI http router does not support 100 Continue. Afaik the only way to
have a 100 continue message working is using mod_wsgi in non-daemon mode.
All of the others application server has this limit (there is a Graham
Dumpleton blog post about that)
This is obviously a "problem" only for curl -T, if you use -d the
behaviour changes.
Supporting 100-continue in uWSGI http router should not be too complex, if
you really need it, fill a bug in the wiki.
--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi