httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Cwik <>
Subject Changing request method
Date Mon, 04 Apr 2011 22:10:00 GMT
Hi all,

I'm trying to write a module that will improve REST compatibility with Flex
& JS by implementing support for X-Http-Method-Override to change the
request method when only GET/POST are the only methods supported from the

I've read the modules book and looked through lots of other modules, but I
can't figure out the right way to do this.  I've implemented a input filter,
but it always seems like the request has been read by the time my filter
runs and I only get body content (I've tried registering it at
AP_FTYPE_CONNECTION and even AP_FTYPE_CONNECTION+1, but never see the raw

Looking at hooks, it seems like the earliest I can hook in is
post_read_request; also too late.

Another direction I went was to create a subrequest and execute that instead
of the current request.  That worked fine, but ended up executing my current
request twice.  Is this the right way to go?  If so,
1) how do I stream data to the subrequest (e.g. POST and PUT)
2) how do I terminate the current processing chain so it stops after my
subrequest (and doesn't execute again)?  I tried ap_internal_fast_redirect,
but that ended up crashing mod_php in the subrequest.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message