Welcome! Log In Create A New Profile

Advanced

Re: nginx + my module crashes only when ignore client abort = on

Maxim Dounin
March 18, 2013 07:18AM
Hello!

On Mon, Mar 18, 2013 at 01:40:24AM -0400, gadh wrote:

> thanks Maxim ! i very appreciate your help on this.
> about the temp file - i protect from a response to be written to a file by
> knowing the max size that can be sent by the server and enlarging the proxy
> buffers accordingly.

You are not initializing subrequest's request_body->temp_file
pointer (among other request_body members). It might point
anywhere, and will cause problems.

> i know i ruin the original request header - its the main purpose for my code
> ! i want to issue an independant subrequest to another server, no to to the
> original. but the r->main->... is not ruined and acting ok afterwards.

Yes, indeed.

Note though, that by changing headers_in structure you are
responsible for it's consistency. It's usually much better idea
to use upstream functionality to create needed request to an
upstream instead (proxy_set_body, proxy_pass_headers and so on).

> in any case, i ask you to support this subrequest mechasnim, its obviously
> needed to send a subrequest to any server, not just to the original one, and
> also to control its response instead of just adding it to the start/end of
> page, its alot more flexible.
> can i use another mechanism in order to achive those goals ? to create a new
> upstream module ?

What is supported is subrequest in memory functionality, which
allows you to get the response in memory instead of appending it
to the response. It only works with certain upstream protocols
though. And it wasn't supposed to work at arbitrary request
processing phases, so it might be non-trivial to do things
properly, in particular - ensure subrequest consistency at early
phases of request processing and to rerun the main request once
subrequest is complete.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

nginx + my module crashes only when ignore client abort = on

gadh March 14, 2013 11:36AM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 14, 2013 11:58AM

Re: nginx + my module crashes only when ignore client abort = on

Maxim Dounin March 14, 2013 12:34PM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 14, 2013 12:46PM

Re: nginx + my module crashes only when ignore client abort = on

Maxim Dounin March 14, 2013 01:06PM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 17, 2013 05:47AM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 17, 2013 03:00PM

Re: nginx + my module crashes only when ignore client abort = on

Maxim Dounin March 17, 2013 07:54PM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 18, 2013 01:40AM

Re: nginx + my module crashes only when ignore client abort = on

Maxim Dounin March 18, 2013 07:18AM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 18, 2013 07:24AM

Re: nginx + my module crashes only when ignore client abort = on

gadh March 18, 2013 09:45AM

Re: nginx + my module crashes only when ignore client abort = on

gadh April 09, 2013 08:59AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 85
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready