[fotobilder] r1440: LJSUP-8566: Set content length to 0 when...
Committer: vad
LJSUP-8566: Set content length to 0 when X-Proxy-Capabilities is in use.U trunk/lib/Apache/FotoBilder/Pic.pm
Modified: trunk/lib/Apache/FotoBilder/Pic.pm
===================================================================
--- trunk/lib/Apache/FotoBilder/Pic.pm 2011-02-08 02:51:22 UTC (rev 1439)
+++ trunk/lib/Apache/FotoBilder/Pic.pm 2011-04-12 18:11:53 UTC (rev 1440)
@@ -291,11 +291,14 @@
(! $opts->{palspec} || $opts->{size} > 40_960) )
{
LJ::Request->header_out( 'X-REPROXY-EXPECTED-SIZE', $opts->{'size'} );
+ LJ::Request->header_out("Content-length", 0); # no body in this case, so no content-length
+
if ($paths->[0] =~ m!^http://!) {
LJ::Request->header_out( 'X-REPROXY-URL', join(' ', @$paths) );
} else {
LJ::Request->header_out( 'X-REPROXY-FILE', $paths->[0] );
}
+
LJ::Request->send_http_header();
return LJ::Request::OK;
}
