perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boris Zentner <...@2bz.de>
Subject mod_perl2, HEAD request and Content-Length
Date Fri, 30 Jul 2004 23:22:21 GMT
Hi,

I have a handler, that serve dynamic pages or static ones. If the handler gets 
a HEAD request, it answers with

  ...
  $apr->headers_out->{'Content-Length'} = 12345;
  $apr->content_type($media_type) unless $apr->main;
  if ( $apr->header_only ) {
    return DONE;
  }
  ...

This works, but the Content-Length header is removed by someone. I do not use 
any filters and even when, there is no body of the message.

Who strips my Content-Length header?

How to find who modified my headers?

Is this a bug or a desired behavior?

I know there are filters and perhaps other handlers and for some of them it 
makes sense to modify or strip my header, but is that true in my case?

Currently I use rflush to force out the headers. What is the recommended 
practice? 
  
  ...
  $apr->headers_out->{'Content-Length'} = 12345;
  $apr->content_type($media_type) unless $apr->main;
  if ( $apr->header_only ) {
    $apr->rflush;
    return DONE;
  }
  ...

-- 
Boris

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message