mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
HttpUtils: HTTP version reverted to 1.0, set $hash->{httpversion} for other
git-svn-id: https://svn.fhem.de/fhem/trunk@6067 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a58947b797
commit
8f42289fc1
@ -188,9 +188,10 @@ HttpUtils_Connect2($)
|
||||
my $method = $hash->{method};
|
||||
$method = ($data ? "POST" : "GET") if( !$method );
|
||||
|
||||
my $hdr = "$method $hash->{path} HTTP/1.1\r\n";
|
||||
my $httpVersion = $hash->{httpversion} ? $hash->{httpversion} : "1.0";
|
||||
my $hdr = "$method $hash->{path} HTTP/$httpVersion\r\n";
|
||||
$hdr .= "Host: $hash->{host}\r\n";
|
||||
$hdr .= "Connection: Close\r\n";
|
||||
$hdr .= "Connection: Close\r\n" if($httpVersion ne "1.0");
|
||||
$hdr .= "Authorization: Basic $hash->{auth}\r\n" if(defined($hash->{auth}));
|
||||
$hdr .= $hash->{header}."\r\n" if(defined($hash->{header}));
|
||||
if(defined($data)) {
|
||||
@ -305,7 +306,7 @@ HttpUtils_ParseAnswer($$)
|
||||
# url, callback
|
||||
# optional(default):
|
||||
# hideurl(0),timeout(4),data(""),loglevel(4),header(""),
|
||||
# noshutdown(1),shutdown(0),
|
||||
# noshutdown(1),shutdown(0),httpversion("1.0")
|
||||
# method($data ? "POST" : "GET")
|
||||
# Example:
|
||||
# HttpUtils_NonblockingGet({
|
||||
|
Loading…
x
Reference in New Issue
Block a user