Fixes #155 by disabeling the HTTP/1.1 100-Continuation mechanism (clearing the Expect-Header), which breaks with imcompatible servers for POST-requests larger than 1024B. Added explicit content accepted encoding for #156. This should resolve the issue. However, further testing on this is required.
This commit is contained in:
parent
46e88d3e80
commit
419be435d0
@ -72,6 +72,7 @@ class AsyncHttpRequest implements UsageInformationAble {
|
||||
array_push($this->headers, 'Keep-Alive: ' . $keepAlive);
|
||||
array_push($this->headers, 'Connection: Keep-Alive');
|
||||
}
|
||||
array_push($this->headers, 'Accept-Charset: utf-8');
|
||||
|
||||
$request = $this->newRequest($this->url, $this->timeout);
|
||||
$request->getOptions()->set(CURLOPT_AUTOREFERER, true)// accept link reference
|
||||
@ -88,6 +89,8 @@ class AsyncHttpRequest implements UsageInformationAble {
|
||||
array_push($this->headers, 'Content-Type: ' . $this->contentType);
|
||||
array_push($this->headers, 'Keep-Alive: timeout=600, max=2000');
|
||||
array_push($this->headers, 'Connection: Keep-Alive');
|
||||
array_push($this->headers, 'Expect:');
|
||||
array_push($this->headers, 'Accept-Charset: utf-8');
|
||||
|
||||
//$content = str_replace(array("\r", "\n"), '', $this->content);
|
||||
$content = $this->content;
|
||||
@ -229,4 +232,4 @@ class AsyncHttpRequest implements UsageInformationAble {
|
||||
public function setTimeout($timeout) {
|
||||
$this->timeout = $timeout;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user