Welcome! Log In Create A New Profile

Advanced

Re: try_files and GET variables

All files from this thread

File Name File Size   Posted by Date  
patch.try_files.746 326 bytes open | download Igor Sysoev 03/30/2009 Read message
March 30, 2009 10:17AM
On Mon, Mar 30, 2009 at 04:47:21PM +0300, Reinis Rozitis wrote:

> Hello,
> tried to replace the webserver config to use try_files instead of rewrites
> (on 0.7.46), it kinda works but I get some garbage in QUERY_STRING on the
> php fastcgi backend - so php doesnt see any GET variable.
>
>
> The config is simple:
>
> location /tmp {
> try_files $uri /index.php;
> }
>
>
> When I open http://myserver/tmp/?var=1 and dump the $_SERVER variables
> 'REQUEST_URI' is correct - '/tmp/?var=1' but QUERY_STRING gets something
> like 'H??H=???' (non-printable chars)
>
>
>
>
> If I change the nginx config to named location everything works as expected
> (all the GET variables are passed and QUERY_STRING is correct):
>
> location /tmp {
> try_files $uri @tmp;
> }
>
> location @tmp{
> fastcgi_pass 127.0.0.1:1026;
> fastcgi_index index.php;
> include fastcgi_params;
> fastcgi_param SCRIPT_FILENAME $document_root/index.php;
> }
>
>
> Where is the catch?

The attached patch fixes the bug.


--
Igor Sysoev
http://sysoev.ru/en/
Attachments:
open | download - patch.try_files.746 (326 bytes)
Subject Author Posted

try_files and GET variables

Reinis Rozitis March 30, 2009 09:47AM

Re: try_files and GET variables Attachments

Igor Sysoev March 30, 2009 10:17AM

Re: try_files and GET variables

Reinis Rozitis March 30, 2009 11:14AM

Re: try_files and GET variables

Igor Sysoev March 30, 2009 11:48AM

Re: try_files and GET variables

Reinis Rozitis March 30, 2009 12:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 276
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready