1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 10:03:27 +01:00

1254 Commits

Author SHA1 Message Date
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
Michael Dowling
9627715757 Adding back json helper functions 2016-01-30 15:55:20 -08:00
Jonathan Eskew
7377cff8fa Use a LazyOpenStream instead of try_fopen r+ 2016-01-25 10:32:37 -08:00
Aleksey Kozakov
2cffbeb826 Changed double quotes to single quotes 2016-01-25 16:23:19 +02:00
Aleksey Kozakov
2138667fe7 Changed to single quotes 2016-01-25 16:18:25 +02:00
Jeremy Lindblom
365ca94919 Alternative to #1372. More flexible history containers.
Allows an array or array-accessible object to be used as the history container for the history middleware.
2016-01-22 13:41:00 -08:00
Aleksey Kozakov
afaa8917cb The "Host" header is being preserved, if it was set manually. 2016-01-22 12:20:07 +02:00
Michael Dowling
a21d3ccb7e Merge pull request #1292 from ivank/sink-for-mock-handler
Implement "sink" for MockHandler
2015-11-15 01:29:07 -08:00
Michael Dowling
3a0020170b Merge pull request #1203 from mortenhauberg/master
Yield key
2015-11-15 01:27:09 -08:00
Michael Dowling
5c12b74e94 Merge pull request #1286 from daleattree/master
https://github.com/guzzle/guzzle/issues/1256
2015-11-15 01:15:37 -08:00
Dale Attree
1d3cfb248a Set SSL verify peer name to true when verify peer is true.
Added test for to assert verify peer name
2015-11-05 21:39:55 +02:00
Ivan Kerin
ae2536bf72 Implement "sink" for MockHandler 2015-10-30 17:56:48 +02:00
Dale Attree
3937279ba1 Update StreamHandlerTest.php
Incorrect assertion added
2015-10-27 14:45:27 +02:00
Michael Dowling
0a966bbe9c Message tweaks and adding truncation notice 2015-10-26 21:03:44 -07:00
Michael Dowling
1654679ba0 Merge remote-tracking branch 'shadowhand/hotfix/improved-middleware-exception' into response-body-exception 2015-10-26 20:47:11 -07:00
Dale Attree
52e099d3ec https://github.com/guzzle/guzzle/issues/1256
Code added to resolve issue 1256
2015-10-21 16:45:15 +02:00
Woody Gilk
5a5893c19f Switch Middleware to use exception factory
The `RequestException::create` factory was not being used anywhere.
Using it inside of `Middleware::httpErrors` simplifies the code and
allows for simpler changes in the future.

Also updates the message formatting of the exception factory to
provide a more complete status, including the body of the response.
2015-10-20 08:43:14 -05:00