George Mponos
ffc61ebd8d
Fix wrong namespaces
2018-10-31 22:40:38 +02:00
Jason Moore
cc362add6b
Add annotations so tests aren't marked as risky
2018-10-03 14:25:28 -05:00
Jason Moore
edd4607e02
Add assertions
2018-10-03 14:24:58 -05:00
Jason Moore
6e0945c536
Change provider method prefix to provider
2018-10-03 14:23:23 -05:00
SpacePossum
5c7a5c524e
RequestException - check if readable before access ( #2081 )
...
* check if readable before access
* Add unit tests for RequestException::getResponseBodySummary
* use real object in test
* update test for older PHP version support
* remove no longer used imports
* Update RequestExceptionTest.php
2018-08-08 06:37:00 +02:00
Márk Sági-Kazár
0773d442aa
Merge pull request #2064 from AlessandroMinoccheri/split_in_many_lines
...
split some long lines in many
2018-04-23 15:18:18 +02:00
Alessandro Minoccheri
2e7aec0b44
split some long lines in many
2018-04-23 14:07:01 +02:00
Gabriel Caruso
0d7c63a663
Use assertRegExp
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-04-23 02:33:37 -03:00
Dariusz Ruminski
79294ad0a6
DX: small CS fixes
2018-04-08 21:15:02 +02:00
Márk Sági-Kazár
6da464c377
Merge pull request #1999 from curtisdf/malformed-domain
...
Error with malformed domain that contains a "/" character
2018-03-26 13:36:33 +02:00
Márk Sági-Kazár
8ffb1d2486
Merge pull request #1998 from curtisdf/master
...
A better fix for #1894 - "Undefined offset: 0"
2018-03-26 13:35:14 +02:00
David Schoen
2a7d3a4ed2
Fix bug parsing 0 epoch expiry times
...
As per https://github.com/guzzle/guzzle/issues/1952 expiry times
specified as "Thu, 01 Jan 1970 00:00:00 GMT" should be treated as
expired, but they weren't because 0 was implicitly casting to a bool in
SetCookie::isExpired().
2018-02-16 21:23:26 +11:00
Curtis Farnham
e6f837a9a8
Error with malformed domain that contains a "/"
2018-01-31 12:46:25 -08:00
Curtis Farnham
64976eb401
Fix for #1894 - "Undefined offset: 0"
2018-01-31 11:44:37 -08:00
Gabriel Caruso
36e89c8968
Support PHPUnit 6
2018-01-23 16:01:32 -02:00
Gabriel Caruso
38d61ba642
Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase
2018-01-23 16:01:32 -02:00
Gabriel Caruso
501c7c2994
Refactored tests ( #1970 )
2017-12-04 08:55:06 +01:00
Gabriel Caruso
83974b7f12
Refactoring tests ( #1964 )
2017-11-29 07:48:19 +01:00
Dori
065287bc14
Test cookie handling when cookie path is empty. ( #1778 )
...
* Test cookie handling when cookie path is empty.
* Fix cookie path when attribute sent by server is empty or not start with a slash char.
2017-06-10 16:17:14 +02:00
notxarb
114516bcb4
Bugfix/curlopt capath ( #1684 )
2017-05-01 11:38:41 +02:00
Márk Sági-Kazár
4149288b3d
Merge pull request #1721 from duncan3dc/content-length-with-get
...
[PrepareBodyMiddleware] Always include the Content-Length if there's a body
2017-05-01 11:18:14 +02:00
Pavel Batanov
703160e28b
Add PHP 7.2 testing ( #1811 )
...
* Update travis to test against php 7.2
* Add tests for countables
* Update dev phpunit to ^5.0
* Fix tcp proxy URL
2017-05-01 11:12:41 +02:00
Dylan McDonald
b517bd912a
Added convenience method to access a cookie by name ( #1318 )
...
* Added convenience method to access a cookie by name
* updated pull request against newest version
* added default null edge case 👍 to @Nyholm
* added null test to Cookie Jar Test
* added better null protection
* disallowed null names in getCookieByName
* changed null to empty string
2017-04-07 22:03:48 +02:00
Márk Sági-Kazár
a1c4a74bf3
Merge pull request #1569 from miguelbalboa/master
...
Added curl ntlm auth support
2017-03-22 12:33:29 +01:00
Craig Duncan
fcfd6d62ba
Always include the Content-Length if there's a body
2017-03-04 18:26:50 +00:00
Márk Sági-Kazár
437c0c3321
Merge pull request #1611 from arnaud-lb/read-timeout
...
Add 'read_timeout' option
2017-02-23 21:32:34 +01:00
DQNEO
6a99df94a2
check handler type on construction ( #1745 )
2017-02-19 16:59:27 +01:00
Dan
77a16c8d30
Track redirect HTTP status codes ( #1711 )
2017-01-15 10:48:03 +01:00
Miguel Balboa
6e2c1d8500
Added NTLM Support
2017-01-13 13:54:21 -08:00
Arnaud Le Blanc
ed1d1bdecf
Add 'read_timeout' option
2016-11-09 17:59:14 +01:00
Márk Sági-Kazár
58219b370b
Merge pull request #1621 from cnanney/master
...
Don't include summary in exception message when body is empty
2016-10-23 11:32:37 +02:00
Bas van Vliet
56ed0ef043
Handle on_headers option in MockHandler ( #1580 )
...
* Handle on_headers option
* Tests for correct handling of on_headers option
2016-10-21 23:23:29 +02:00
Chris Nanney
7e405efc1a
Don't include summary in exception message when body is empty
...
Exception messages end with ":\n\n" when there is no response body.
2016-10-18 16:32:51 -05:00
Maksim N
113071af3b
Obfuscates URI if there is an username and a password present ( #1570 )
...
* Obfuscates URI if there is an username and a password present
Lets assume that you include username and password into the URI. Currently, if the exception accrued the error message looks like so:
```
Client error: `POST http://username:secrect@hostname.com/somePath ` resulted in a `400 Bad Request` response: ......, (truncated...)
```
It lead to security issue because password is shown like it is.
This commit will hide the password (replace it with `***`).
* Make `obfuscateUri` private
* Improve tests
2016-09-12 17:07:23 +02:00
Michael Butler
984f1d85af
handle drain case where content-length is the literal string zero
2016-09-05 17:21:49 -04:00
Michael Dowling
ba573b420d
Merge pull request #1562 from scheb/delay-with-response
...
Retry-After Header in Guzzle 6
2016-08-31 09:51:05 -07:00
Christian Scheb
16ebf2ef37
Pass nullable Response to delay callable
2016-08-30 20:53:41 +02:00
pkruithof
ac09112309
Only add scheme when host is present
2016-08-29 16:10:26 +02:00
Michael Dowling
5b3279a810
Do not drain on HEAD requests
2016-07-01 12:25:54 -07:00
Michael Dowling
a6ed049497
Only read up to Content-Length in stream wrapper
...
This commit updates the stream wrapper to only read up to the number of
bytes returned in the Content-Length header when draining a stream
synchronously.
2016-06-30 13:49:28 -07:00
Tobias Schultze
7cdd16f2c5
fix and add test for URI without scheme
2016-06-30 12:22:40 +02:00
Michael Dowling
eeff956f2c
Merge pull request #1480 from Tobion/uri-default
...
Remove URI default value
2016-06-12 16:58:31 -07:00
Tobias Schultze
566d90d7cd
readd default URI for client implementation for BC
2016-06-05 15:18:14 +02:00
Andreas Fernandez
8abe196718
Ignore zeroed timeout with StreamHandler to use PHP default instead
...
Using \GuzzleHttp\Client without cURL being installed falls back to the
StreamHandler. As documented, guzzle uses a `timeout => 0` setting by
default, if that setting isn't explicitly passed as option. This value
is passed to the context of the stream, causing every request to fail
instantly as `timeout => 0` has a different meaning for streams.
Fixes #1487
2016-06-05 11:58:26 +02:00
Michael Dowling
0d082d5714
Fixing broken test. Closes #1470
2016-05-08 12:28:38 -07:00
Jonathan Eskew
b65cdda6b0
Rewind seekable request bodies before dispatching to cURL
2016-03-07 13:12:30 -08:00
Jonathan Eskew
1803e73cf7
Add original content encoding and length to responses
2016-02-23 15:11:24 -08:00
Dennis Væversted
9a6691fb90
Do not attempt to escape cookie values.
...
Trust that the cookie value sent by the server is escaped accordingly,
and do not attempt to escape the cookie by adding quotes around the value.
2016-02-17 22:02:27 +01:00
Michael Dowling
fff93932cd
Merge branch 'fix-host-header-preserving'
2016-01-30 16:14:42 -08:00
Michael Dowling
a799bb6f0a
PHP 7 fixes
2016-01-30 16:01:12 -08:00