httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Townsend <>
Subject Re: Problem with ap_internal_redirect_handler
Date Thu, 19 Aug 2010 13:53:15 GMT
  On 18/08/2010 13:54, Sorin Manolache wrote:
> On Wed, Aug 18, 2010 at 14:24, Martin Townsend
> <>  wrote:
>>   Hi,
>> I'm currently trying to add the ability to redirect requests for the initial
>> html page to a captcha page when there is no session or no valid session.
>>   Currently I'm doing this in the fixups hook:
>> mod_smu_fixups(request_rec* r) {
>> ....
>> }
>> So if we have an initial request that is HTML then redirect to captcha.shtml
>> which contains SSI for header, footer etc.  There will also be a request for
>> a captcha image using a fixed filename.  The fixup will detect this and send
>> the request to a custom handler that will auto-generate the captcha image.
>>   The problem I have is that I'm getting sub-requests and requests for the
>> captcha image twice, see log below.  I assume that the original request for
>> index.shtml and the request for captcha.shtml are being processed.  Using
>> firebug I see that the captcha image that is displayed in the debug output
>> isn't the one that gets displayed in the HTML so I can assume that the image
>> is being sent twice.  I notice that the browser goes into a waiting state
>> until the timeout expires.  Does anybody know what I'm doing wrong?  I've
>> tried returning DECLINED or DONE after the ap_internal_redirect_handler call
>> but still get the problem.  Any help appreciated.
>> Best Regards,
>> Martin.
> Try putting
> if (!ap_is_initial_req(req))
>     return DECLINED;
> at the beginning of your fixups callback.
> Sorin

I've Just got to the bottom of why I am receiving the captcha image 
request twice.  I had firebug turned on which was requesting the image 
again although it didn't for all the other images on the page.

Martin Townsend
Suite 1, Unit 41
Shrivenham Hundred Business Park
Majors Road
Wilts SN6 8TZ

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