httpclient : reset the parameters when all the content is get (to allow the redirect to work correctely)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4816 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -543,7 +543,7 @@ class Httpclient
|
||||
$cookies = $this->cookieToSend ($this->url);
|
||||
if (! empty ($cookies))
|
||||
{
|
||||
$this->headersSent[] = "Cookie: ".implode ("; ", $cookies);
|
||||
$this->headersSent["Cookie"] = implode ("; ", $cookies);
|
||||
}
|
||||
if ($this->method !== "GET" && ! empty ($this->formData))
|
||||
{
|
||||
@@ -730,6 +730,9 @@ class Httpclient
|
||||
$content = gzdecode ($content);
|
||||
}
|
||||
$this->disconnect ();
|
||||
$this->headersReset ();
|
||||
$this->formData = "";
|
||||
$this->rawData = "";
|
||||
if ($this->httpCode === 301 || $this->httpCode === 302 ||
|
||||
key_exists ("Location", $this->headersReceived))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user