Skip Menu |

This queue is for tickets about the Perlbal CPAN distribution.

Report information
The Basics
Id: 40233
Status: resolved
Priority: 0/
Queue: Perlbal

People
Owner: Nobody in particular
Requestors: BORISZ [...] cpan.org
Cc: bzm [...] 2bz.de
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



CC: Boris Zentner <bzm [...] 2bz.de>
Subject: [patch] add missing modify_response_headers hooks
Hi, this patch fix the following: - adds two missing modify_response_headers hooks. - add one missing server header - keep setup_keepalive close to the content-length header -- Boris
Subject: missing_headers_and_hooks.diff
diff -Nur a/Perlbal-1.72/lib/Perlbal/ClientHTTPBase.pm b/Perlbal-1.72/lib/Perlbal/ClientHTTPBase.pm --- a/Perlbal-1.72/lib/Perlbal/ClientHTTPBase.pm 2008-09-14 02:23:38.000000000 +0200 +++ b/Perlbal-1.72/lib/Perlbal/ClientHTTPBase.pm 2008-10-21 20:29:01.000000000 +0200 @@ -712,6 +712,10 @@ $res->header("Content-Length", length($body)); $self->setup_keepalive($res); + $res->header('Server', 'Perlbal'); + + return if $self->{service}->run_hook('modify_response_headers', $self); + $self->state('xfer_resp'); $self->tcp_cork(1); # cork writes to self $self->write($res->to_string_ref); @@ -750,10 +754,12 @@ $res->header('Content-Length', length($body)); } - $res->header('Server', 'Perlbal'); - $self->setup_keepalive($res); + $res->header('Server', 'Perlbal'); + + return if $self->{service}->run_hook('modify_response_headers', $self); + $self->state('xfer_resp'); $self->tcp_cork(1); # cork writes to self $self->write($res->to_string_ref);
Thanks, I've applied this and also added one more place where modify_response should be called. On Tue Oct 21 14:53:23 2008, BORISZ wrote: Show quoted text
> > Hi, > > this patch fix the following: > > - adds two missing modify_response_headers hooks. > - add one missing server header > - keep setup_keepalive close to the content-length header
ding, closing.