mirror of
https://github.com/friendica/friendica
synced 2025-04-28 20:24:24 +02:00
Merge remote-tracking branch 'upstream/develop' into server-detection
This commit is contained in:
commit
8b7cb5d9ef
328 changed files with 13242 additions and 10211 deletions
|
@ -33,14 +33,14 @@ interface ICanHandleHttpResponses
|
|||
*
|
||||
* @return string The Return Code
|
||||
*/
|
||||
public function getReturnCode();
|
||||
public function getReturnCode(): string;
|
||||
|
||||
/**
|
||||
* Returns the Content Type
|
||||
*
|
||||
* @return string the Content Type
|
||||
*/
|
||||
public function getContentType();
|
||||
public function getContentType(): string;
|
||||
|
||||
/**
|
||||
* Returns the headers
|
||||
|
@ -55,21 +55,20 @@ interface ICanHandleHttpResponses
|
|||
|
||||
/**
|
||||
* Returns all headers
|
||||
* @see MessageInterface::getHeaders()
|
||||
*
|
||||
* @see MessageInterface::getHeaders()
|
||||
* @return string[][]
|
||||
*/
|
||||
public function getHeaders();
|
||||
|
||||
/**
|
||||
* Check if a specified header exists
|
||||
*
|
||||
* @see MessageInterface::hasHeader()
|
||||
*
|
||||
* @param string $field header field
|
||||
*
|
||||
* @return boolean "true" if header exists
|
||||
*/
|
||||
public function inHeader(string $field);
|
||||
public function inHeader(string $field): bool;
|
||||
|
||||
/**
|
||||
* Returns the headers as an associated array
|
||||
|
@ -83,21 +82,22 @@ interface ICanHandleHttpResponses
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isSuccess();
|
||||
public function isSuccess(): bool;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getUrl();
|
||||
public function getUrl(): string;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getRedirectUrl();
|
||||
public function getRedirectUrl(): string;
|
||||
|
||||
/**
|
||||
* @see MessageInterface::getBody()
|
||||
* Getter for body
|
||||
*
|
||||
* @see MessageInterface::getBody()
|
||||
* @return string
|
||||
*/
|
||||
public function getBody();
|
||||
|
@ -105,20 +105,20 @@ interface ICanHandleHttpResponses
|
|||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRedirectUrl();
|
||||
public function isRedirectUrl(): bool;
|
||||
|
||||
/**
|
||||
* @return integer
|
||||
*/
|
||||
public function getErrorNumber();
|
||||
public function getErrorNumber(): int;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getError();
|
||||
public function getError(): string;
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function isTimeout();
|
||||
public function isTimeout(): bool;
|
||||
}
|
||||
|
|
|
@ -94,11 +94,11 @@ class HttpClient extends BaseFactory
|
|||
|
||||
$guzzle = new GuzzleHttp\Client([
|
||||
RequestOptions::ALLOW_REDIRECTS => [
|
||||
'max' => 8,
|
||||
'on_redirect' => $onRedirect,
|
||||
'track_redirect' => true,
|
||||
'strict' => true,
|
||||
'referer' => true,
|
||||
'max' => 8,
|
||||
'on_redirect' => $onRedirect,
|
||||
'track_redirects' => true,
|
||||
'strict' => true,
|
||||
'referer' => true,
|
||||
],
|
||||
RequestOptions::HTTP_ERRORS => false,
|
||||
// Without this setting it seems as if some webservers send compressed content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue