Handling a subrequest response - determining upstream vs. static file and size

Brian Moran bmoran at onehub.com
Tue Mar 20 04:31:59 UTC 2012


I am modifying an existing working filter module. I am issuing a
subrequest, which is to a URI, or to a static local file (via a location in
the config); I'd like to determine the size of the response that I'm
getting back from the subrequest.

In the subrequest's header filter, I'm doing this to find out the response
size:
if (r->upstream) {
r->upstream->headers_in.content_length_n

-- 
e: bmoran at onehub.com
p: +1 206 390 4376

Onehub, Inc.
www.onehub.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120319/aa381b5b/attachment.html>


More information about the nginx-devel mailing list