On 27 Oct 2002, Philippe M. Chiasson wrote:
> Here it is, and I believe it should be backwards compatible with the 1.x
> version, except for support of $Apache::DoInternalRedirects when
> redirecting with a Location: header.
...
> +sub cgi_header_out {
> + my ($r, $key, $val) = @_;
> + my $retval = $r->headers_out->get($key);
> +
> + if(defined $val) {
> + if('content-type' eq lc $key) {
> + $r->content_type($val);
> + }
> + elsif('status' eq lc $key) {
> + $r->status($val);
> + }
> + elsif('location' eq lc $key) {
> + if($val =~ m|^/|) {
> + $r->status(302);
> + $r->headers_out->set($key,$val);
> + }
> + }
> + elsif('content-length' eq lc $key) {
> + $r->set_content_length($val);
> + }
> + elsif('transfer-encoding' eq lc $key) {
> + $r->headers_out->set($key => $val);
> + }
> + elsif('set-cookie' eq lc $key) {
> + #The HTTP specification says that it is legal to merge duplicate
> + #headers into one. Some browsers that support Cookies don't like
> + #merged headers and prefer that each Set-Cookie header is sent
> + #separately. Lets humour those browsers.
> + $r->err_headers_out->add($key => $val);
> + }
> + else {
> + $r->err_header_out->merge($key => $val);
> + }
> + }
> +
> + return $retval;
> }
i think this should be implemented on top of modperl_cgi_header_parse.
has all the same logic in there already. can you take a look at doing
that?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]