Welcome! Log In Create A New Profile

Advanced

Re: Change HTTP method of Sub request

agentzh
March 19, 2010 03:08AM
On Fri, Mar 19, 2010 at 9:24 AM, W. Andrew Loe III <andrew@andrewloe.com> wrote:
> I have a Rails app that receives a POST and I would like to
> X-Accel-Redirect a file back to the client, but the fileserver is
> receiving a POST. Can I rewrite the HTTP method internally? I cannot
> find the documentation on this.

How about this?

location /proxy {
set_unescape_uri $body $arg_body;
echo_subrequest_async POST /fileserver -b $body
}

Then X-Accel-Redirect to /proxy?body=xxxx where xxxx is the content
body that you have read from within your PHP script.

Good luck :)
-agentzh

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Change HTTP method of Sub request

W. Andrew Loe III March 18, 2010 09:28PM

Re: Change HTTP method of Sub request

agentzh March 19, 2010 03:08AM

Re: Change HTTP method of Sub request

agentzh March 19, 2010 03:08AM

Re: Change HTTP method of Sub request

Maxim Dounin March 19, 2010 03:38AM

Re: Change HTTP method of Sub request

W. Andrew Loe III March 19, 2010 01:06PM

Re: Change HTTP method of Sub request

Maxim Dounin March 19, 2010 01:34PM

Re: Change HTTP method of Sub request

W. Andrew Loe III March 19, 2010 01:48PM

Re: Change HTTP method of Sub request

Maxim Dounin March 19, 2010 03:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 131
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