Am Montag, den 09.01.2006, 23:45 +0100 schrieb David N. Welton:

> > The only thing to do for configuration is, to extend the text/html mime
> > type (in $APACHE/conf/mime.types) by the .rvt extension:
> > 
> > ...
> > text/html   html htm rvt
> > ...
> 
> I don't think that's quite right...  we don't want the Rivet handler to
> parse html files...does it try to?

No, it does not. I have created a translate function, registered with
ap_hook_translate_name(). It checks for the file ending - which is done
by parsing the request_rec::args field. This seems to be the only place
where the file (relative to the server root) is accessible as 

/file.rvt?param1=value1&param2=value2 ...

It sets the request_rec::filename member to the complete file. I let the
handlers (Rivet_SendContent and Rivet_TranslateUri) return DECLINED, if
the extension is not .rvt:
    
    ...
    if (!Rivet_IsRivetFile(r->filename))
        return DECLINED;
    ...



I have a problem here: the request_rec, which is given as argument to
the handlers, is not complete - unfortunately. All the file and uri
related members are not set - even worse: they are not even set to NULL
but contain garbage :-/.
This is funny and irritating to me... I think that it must be possible
somehow, to get at a more valuable request_rec during the hook
processing, but I did not find out how... The Apache API is very poorly
documented :-(.

It would be nice if someone who has more experience with the Apache2 API
could try to fix this or point me at a way to get it "right"... Maybe
the module itself is responsible for setting the file and uri members to
the appropriate request_rec?


Eckhard



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to