* Roberto De Ioris <[email protected]> [2013-03-08 19:08]:
>
>> Hi,
>>
>> it seems that the cgi-index/php-index from the CGI and PHP
>> plugins do not work with HTTP POST, that is POST requests do not
>> seem to be handled at all while the corresponding GET works fine. Is
>> that a bug?
>> --
>> Guido Berhoerster
>>
>
> you mean that sending to the script directly works ?

Yes:

----
$ curl -v http://127.0.0.1:8080/
* About to connect() to 127.0.0.1 port 8080 (#0)
*   Trying 127.0.0.1...
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.25.0 (x86_64-suse-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1e 
> zlib/1.2.7 libidn/1.25 libssh2/1.4.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/html
* no chunk, no close, no size. Assume close to signal end
<
<p>Hello DEFAULT</p>
* Closing connection #0
$ curl -v -F 'name=gber' http://127.0.0.1:8080/
* About to connect() to 127.0.0.1 port 8080 (#0)
*   Trying 127.0.0.1...
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.25.0 (x86_64-suse-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1e 
> zlib/1.2.7 libidn/1.25 libssh2/1.4.0
> Host: 127.0.0.1:8080
> Accept: */*
> Content-Length: 143
> Expect: 100-continue
> Content-Type: multipart/form-data; 
> boundary=----------------------------616b219b147f
>
< HTTP/1.1 404 Not Found
< Connection: close
< Content-Type: text/plain
<
* Closing connection #0
$ curl -v -F 'name=gber' http://127.0.0.1:8080/index.cgi
* About to connect() to 127.0.0.1 port 8080 (#0)
*   Trying 127.0.0.1...
* connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST /index.cgi HTTP/1.1
> User-Agent: curl/7.25.0 (x86_64-suse-linux-gnu) libcurl/7.25.0 OpenSSL/1.0.1e 
> zlib/1.2.7 libidn/1.25 libssh2/1.4.0
> Host: 127.0.0.1:8080
> Accept: */*
> Content-Length: 143
> Expect: 100-continue
> Content-Type: multipart/form-data; 
> boundary=----------------------------6a15e35b73f1
>
* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Content-Type: text/html
* no chunk, no close, no size. Assume close to signal end
<
<p>Hello gber</p>
* Closing connection #0

----

>
> Is it uWSGI 1.4 or 1.9 ?

An up-to-date git snapshot with the following uwsgi.ini:

----

[uwsgi]
plugins = 0:notfound,http,cgi,router,router_uwsgi
http-socket = :8080

docroot = /home/gber/public_html

check-static = %(docroot)
cgi = %(docroot)

for = cgi pl py
  static-index = index.%(_)
  static-skip-ext = .%(_)
endfor =

for = cgi pl py
  route = \.%(_)$ uwsgi:,9,0
  cgi-index = index.%(_)
endfor =

----

-- 
Guido Berhoerster
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to