httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nce Rt <nce...@yahoo.com>
Subject Re: some key fields of request_rec are null
Date Thu, 07 Mar 2013 18:56:33 GMT
The handler here is a custom handler written by me.

How does one retrieve the Scheme from the incoming request in such user written handlers?


________________________________
 From: Issac Goldstand <margol@beamartyr.net>
To: modules-dev@httpd.apache.org 
Sent: Thursday, March 7, 2013 12:09 AM
Subject: Re: some key fields of request_rec are null
 
On 06/03/2013 23:21, Nce Rt wrote:
>
>
> A custom handler which is registered to run APR_HOOK_FIRST has these fields null when
processing http request:
>       r->content_type, r->parsed_uri.scheme
>
> the http request on the wire has the content_type header set.
>
> r->parsed_uri.path is not null though.
>
>
> apache is configured as reverse proxy here.
>

Hi Nce

1) You didn't say what handler - I assume you mean the default response 
handler
2) Although request_rec might be misleading these days with many 
server-side frameworks distinguishing between "Response" and "Request" 
objects, it doesn't quite work that way in Apache; the request_rec has 
worked pretty much the way it does for a loooooooong time.  So 
r->content_type is actually used to set the *response* content type. 
You might want to get Content-Type from r->headers_in

All the best,
   Issac
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message