Dan
77a16c8d30
Track redirect HTTP status codes ( #1711 )
2017-01-15 10:48:03 +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
EdgarPE
911bcbc8b4
Fix tests for RequestOptions::SYNCHRONOUS check in Proxy::wrapSync()
2015-09-28 10:59:51 +02:00
Daniel Wehner
e464b0198d
Use ::class in tests where it was possible
2015-09-09 11:17:23 +02:00
Michael Dowling
16ccd73eee
Adding tests
2015-09-06 12:51:06 -07:00
Michael Dowling
e881b5ab5b
Adding transfer tests
2015-09-06 12:24:01 -07:00
Michael Dowling
ec1f1a8b56
WIP work on on_stats
2015-09-06 12:11:56 -07:00
Michael Dowling
2e92238902
Finishing the redirect tracking PR
2015-09-06 12:05:56 -07:00
Michael Dowling
134fb899d2
CS fixes
2015-09-06 11:44:21 -07:00
Michael Dowling
362dd6864c
Merge remote-tracking branch 'dawehner/redirect-history' into redirect-history
...
Conflicts:
tests/RedirectMiddlewareTest.php
2015-09-06 11:43:02 -07:00
stefan.r
aef23611dd
If the name string is empty but not 0, ignore the set-cookie-string entirely
2015-09-06 18:03:37 +02:00
Michael Dowling
33af93ab4b
Merge pull request #1232 from spyric/bad_cookie
...
Fix incorrect equal sign in cookie value
2015-09-01 16:14:13 -07:00
Gintautas Miselis
594e39fd8c
Added test for cookie name with square brackets
2015-09-01 21:59:56 +01:00
Gintautas Miselis
72e1d73c68
Allow square brackets in cookie name #1205
2015-09-01 21:56:34 +01:00
Егор Таланцев
9a161432e4
+ fails test
2015-08-28 14:36:24 +05:00