April 04, 2013 04:44AM
Hello

I have this issue trying to use post_action

My config is like this:
location / {
post_action /afterdownload;
....
....
....
location /afterdownload {
proxy_pass
http://78.140.165.80/download_counter.php?FileName=$request&status=$request_completion
;
internal;
}


How to escape the content of $request so it's a valid URL?

Right now the value there is like (from the log)

78.140.165.80 - - [04/Apr/2013:10:36:53 +0200] "GET
/download_counter.php?FileName=GET
/storage/files/0/1/17/176/myvideo.avi?md=IfHSTECs

I get a 400 (Bad request) for this call and I guess it's because the space
after GET inside this variable.

How can I either escape or run a replace on it to remove GET_ from the
beginning of it?

---------------------------------------------------------------
Cristian Rusu
Web Development & Electronic Publishing
Phone: 40 723 625 808
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

url escape variable

crirus April 04, 2013 04:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 142
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready