Skip to content

Commit

Permalink
[backend] BSRPC: allow to omit the default "Connection: close" by set…
Browse files Browse the repository at this point in the history
…ting the "noclose" parameter

This is needed for buggy servers that don't send the Content-Length
if Connection: close is given.
  • Loading branch information
bugfinder committed Mar 6, 2012
1 parent d5fa330 commit eb728f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/BSRPC.pm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ sub createreq {
$path = $uri unless $uri =~ /^https:/;
}
$port = substr($port || ($proto eq 'http' ? ":80" : ":443"), 1);
unshift @xhdrs, "Connection: close";
unshift @xhdrs, "Connection: close" unless $param->{'noclose'};
unshift @xhdrs, "User-Agent: $useragent" unless !defined($useragent) || grep {/^user-agent:/si} @xhdrs;
unshift @xhdrs, "Host: $hostport" unless grep {/^host:/si} @xhdrs;
if (defined $auth) {
Expand Down

0 comments on commit eb728f3

Please sign in to comment.