httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bray <Tim.B...@Sun.COM>
Subject Re: Basics on generating content
Date Sun, 27 May 2007 18:47:34 GMT
On May 27, 2007, at 11:31 AM, Nick Kew wrote:

>>   find modules -name '*.c' -print | xargs egrep xml_to_text
>
> Just grep your /include/ directory.

Well, except for you can learn a *lot* about a function's semantics  
by looking at how a module uses it in practice.

>> Scenario:  I'm about to punt a request using HTTP_FORBIDDEN and I'd
>> like to generate a helpful response body explaining why.
>
> The easy way is to delegate that to the admin with ErrorDocument.

In general I'd agree, but in this particular case the code inside the  
module knows specifics about what's gone wrong, and can provide a  
high-quality error readout.

>> Related: In that same mod_dav.c, there's this:
>
> mod_dav is one of the most complex things in apache,
> and contains incompleteness and fudges in places.
> Are you implementing something that'll run under mod_dav?
> If not, it's probably not a good learning resource.

Under mod_dav?  Nope.  I'm implementing the Atom Protocol (http:// 
bitworking.org/projects/atom/draft-ietf-atompub-protocol-15.html)  
which is *much* simpler than DAV, but does require fairly fine  
control over headers.  So I want to respond to a POST with a 201  
status code *and* micromanage a couple of headers *and* generate a  
response body *and* have it logged.  I'm sure I can convince HTTPD to  
do this, but I'm getting the feeling that a bit of trial and error  
will be involved.

Hmm, I guess if bought your book I'd be pestering this mailing list  
less :)

  -Tim


Mime
View raw message