httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <...@apache.org>
Subject Re: best way to return the content of a file
Date Sat, 18 Aug 2012 10:33:17 GMT

On 18 Aug 2012, at 09:51, nik600 wrote:

> Is better:
> 
> - to read the file and then send is using ap_rprintf

Bad.

> - to use apr_bucket_*

Acceptable.

> - to simply redirect the request changing the r->uri and then return DECLINED.

Yep.

> The strange thing is that i get a 404 error and in error.log i get:

That's because you set r-->uri too late, after it's already been mapped to the
filesystem.

Others have already told you to hook in earlier in the request processing cycle.
I guess it's time to point you at http://www.apachetutor.org/
and the new programmer docs at httpd.apache.org.

-- 
Nick Kew
Mime
View raw message