httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <>
Subject Fwd: Making HTTP requests
Date Tue, 02 Jun 2009 10:00:49 GMT
Heh.  Lost in the ether (again).

Begin forwarded message:

> From: Nick Kew <>
> Date: 1 June 2009 21:10:26 BDT
> To:
> Subject: Re: Making HTTP requests
> Michael Spiegle wrote:
>> I'm writing a module where I need the ability to make HTTP  
>> requests to
>> servers on my backend for business logic.  Just to get my code  
>> working, I
>> wrote a very simple HTTP client library but it only handles basic  
>> HTTP/1.0
>> requests and only checks for return codes 200 and 404.  I'd like  
>> to use a
>> better codebase for making my requests, but am not sure what my  
>> options
>> are.  I looked to see if I could abuse the mod_proxy code, but I  
>> don't
>> think it was meant to be used this way and don't want my code to  
>> break due
>> to changes upstream.  I was thinking about using cURL, but that  
>> would add
>> another dependency to my code.
>> Is there a proper/defined way to use mod_proxy for this, or should  
>> I just
>> move forward with cURL?
> Your module has two basic options.  It can either turn the request  
> into
> a proxy request and do [whatever else] around it - c.f. mod_rewrite.
> Or it can make subrequests to be proxied, as in mod_include.  The  
> latter
> requires a bit of configuration: you make a subrequest into URL space
> defined by a ProxyPass (or RewriteRule).
> -- 
> Nick Kew

View raw message