static POST
Igor Clark
igor at pokelondon.com
Mon Aug 18 22:07:27 MSD 2008
Hi Igor,
I've applied the patch to a fresh copy of 0.6.32 and I'm having the
same problems POSTing to named locations.
Configuration:
location / {
index index.php;
error_page 404 = @phpapp;
}
location @phpapp {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/test.php;
fastcgi_param SCRIPT_URL $fastcgi_script_name; # for use in
particular PHP framework
include fastcgi_params;
}
Form:
<form method="GET" action="/blah"> <input type="text" name="value">
<input type="submit"> </form>
PHP script:
<pre><? print_r($_SERVER); ?></pre>
This configuration works as expected. When I change the form method to
POST
<form method="POST" action="/blah"> <input type="text" name="value">
<input type="submit"> </form>
and submit the form, the client hangs, and I get the attached debug
from nginx, the connection only apparently closing because I press the
browser's "stop" button, and an internal nginx 499 is generated.
Any ideas what's happening?
Cheers,
Igor
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nginx-post-debug.txt
URL: <http://nginx.org/pipermail/nginx/attachments/20080818/c33600f2/attachment.txt>
-------------- next part --------------
On 15 Aug 2008, at 13:34, Igor Clark wrote:
> Superb. Thanks Igor.
>
> ----- Original Message -----
> From: Igor Sysoev <is at rambler-co.ru>
> To: nginx at sysoev.ru
> Sent: Fri, 15 Aug 2008 09:50:26 +0100 (BST)
> Subject: Re: static POST
>
> On Fri, Aug 15, 2008 at 09:31:21AM +0100, Igor Clark wrote:
>
>> Igor, this is great news, thank you. Will it be in the 0.6.x branch
>> release?
>
> Yes, it will be merged. The patch should be suitable for 0.6.x.
>
>> ----- Original Message -----
>> From: Igor Sysoev <is at rambler-co.ru>
>> To: nginx at sysoev.ru
>> Sent: Fri, 15 Aug 2008 08:10:27 +0100 (BST)
>> Subject: Re: static POST
>>
>> On Fri, Aug 15, 2008 at 03:05:42PM +0800, Delta Yeh wrote:
>>
>>> What does this feature use for? Any scenarios?
>>
>> This configuration is replacement of ugly hack:
>>
>> location / {
>>
>> if (-e $request_filename) {
>> break;
>> }
>>
>> proxy_pass ...
>> }
>>
>>
>>> 2008/8/14 Igor Sysoev <is at rambler-co.ru>
>>>
>>>> The attached patch allows POSTs to non-existent files.
>>>> This allows POSTs in following configuration:
>>>>
>>>> location / {
>>>> error_page 404 = @fallback;
>>>> }
>>>>
>>>> location @fallback {
>>>> ...
>>>> }
>>>>
>>>> I intended to include it in the next release.
>>
>>
>> --
>> Igor Sysoev
>> http://sysoev.ru/en/
>>
>>
>>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
>
>
--
Igor Clark ? POKE ? 10 Redchurch Street ? E2 7DD ? +44 (0)20 7749 5355
? www.pokelondon.com
More information about the nginx
mailing list