Welcome! Log In Create A New Profile

Advanced

Re: Create a Request from a String

agentzh
May 25, 2010 09:42PM
On Wed, May 26, 2010 at 2:14 AM, Matthieu Tourne
<matthieu.tourne@gmail.com> wrote:
>
> Thanks for the pointers, but it doesn't really answer my question.
> Agentzh's post shows how to send the content fetched from memcached to the
> downstream.

Aye :)

> I'm trying to send that content representing a request, to an upstream.
> Basically "replaying" a query stored as a string, exactly as if it was
> coming from an open socket.

Basically it's boiled down to manipulating r->headers_in and
r->request_body in a rewrite or access phase handler and then forward
to request object to the upstream handler (remember upstream is a
content handler pe se?) :)

ngx_headers_more has the code for the former while ngx_chunkin and
ngx_echo do have some examples for the latter :)

Cheers,
-agentzh

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

Create a Request from a String

Matthieu Tourne May 25, 2010 01:56AM

Re: Create a Request from a String

Piotr Sikora May 25, 2010 04:24AM

Re: Create a Request from a String

Matthieu Tourne May 25, 2010 02:18PM

Re: Create a Request from a String

agentzh May 25, 2010 09:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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