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

1169 Commits

Author SHA1 Message Date
Michael Dowling
aab03d40c5 Unrolling switch 2015-03-26 10:34:02 -07:00
Michael Dowling
0a3065ea46 CurlFactory tests 2015-03-26 00:30:14 -07:00
Michael Dowling
453a53767e Adding CurlMultiHandler test 2015-03-23 22:41:58 -07:00
Michael Dowling
531cf16905 Adding CurlHandler tests 2015-03-23 21:13:28 -07:00
Michael Dowling
ee185561f7 Adding sync attribute for synchronous requests 2015-03-23 20:54:06 -07:00
Michael Dowling
fe13b4e663 StreamHandler tests 2015-03-23 20:33:21 -07:00
Michael Dowling
aed4694a9a Fixing idiotic mistake 2015-03-23 00:20:56 -07:00
Michael Dowling
650b4c0430 Adding StreamHandler tests and updates 2015-03-23 00:16:44 -07:00
Michael Dowling
8e546cc843 Adding proxy tests 2015-03-22 20:25:18 -07:00
Michael Dowling
78ccbfb164 Adding MockHandler tests 2015-03-22 20:19:33 -07:00
Michael Dowling
831d3ab0ab Adding client tests 2015-03-22 19:32:07 -07:00
Michael Dowling
04a212896f Removing Stream::factory 2015-03-22 17:42:47 -07:00
Michael Dowling
3ec476d49d Testing an edge case 2015-03-22 16:50:32 -07:00
Michael Dowling
5eabdb6db0 Simplifying some client methods and removing URI template arrays 2015-03-22 16:35:41 -07:00
Michael Dowling
841592b09c Making the handler stack an actual stack 2015-03-22 14:51:11 -07:00
Michael Dowling
83fbed5d8a CS fixes 2015-03-22 12:27:58 -07:00
Michael Dowling
1d2b9499e5 Finishing RedirectMiddleware 2015-03-22 12:26:00 -07:00
Michael Dowling
0c21769785 Updating HandlerStack 2015-03-22 10:43:34 -07:00
Michael Dowling
58310521b6 Adding client tests 2015-03-21 23:33:02 -07:00
Michael Dowling
f22fefeaea More functionality to MockHandler 2015-03-21 22:52:06 -07:00
Michael Dowling
af5602945d Test coverage 2015-03-21 22:40:21 -07:00
Michael Dowling
fd39fbbca3 Simplifying multipart post file input 2015-03-21 22:28:50 -07:00
Michael Dowling
8f79355c5e Removing get_ prefix 2015-03-21 22:16:16 -07:00
Michael Dowling
035c8a1774 Removing the option to not hydrate test server responses 2015-03-21 19:25:09 -07:00
Michael Dowling
4facbb2583 Removing set_path/get_path 2015-03-21 19:00:34 -07:00
Michael Dowling
acb33e0731 Cleaning up test server and starting on ClientTest 2015-03-21 17:10:17 -07:00
Michael Dowling
ab1ef88b4c Finishing off remaining pool test 2015-03-21 16:16:49 -07:00
Michael Dowling
af06584ec4 Adding functions.php tests 2015-03-21 16:14:23 -07:00
Michael Dowling
46abe49257 Refactoring 2015-03-21 15:53:38 -07:00
Michael Dowling
6386296592 Cleaning up Pool and test server 2015-03-21 15:33:30 -07:00
Michael Dowling
5129164be7 Lots of refactoring and updates 2015-03-20 00:21:42 -07:00
Michael Dowling
fd52370dd7 Updating for PSR7 changes and promise changes 2015-03-15 23:08:26 -07:00
Michael Dowling
9c9a4cdd71 Backwards compat updates 2015-03-03 14:02:24 -08:00
Michael Dowling
99125ec94d Adding batching and multipart tests 2015-02-26 16:43:45 -08:00
Michael Dowling
b08fc28944 Adding pool tests 2015-02-25 22:49:50 -08:00
Michael Dowling
1a9ad6b553 WIP refactor for PSR-7 2015-02-25 14:50:44 -08:00
Michael Dowling
e38282adb2 Simplifying request sending.
- Removing some duplication
- Nested futures are now resolved in the client.
- Simplified injecting in futures in request events and removing now
  extraneous conditional.
2015-01-23 17:07:13 -08:00
Michael Dowling
8edf6d2bbc Updated the RequestFSM to use gotos.
- This commit updates the request FSM to use goto statements to reduce
  function call overhead and removes 5 stack frames from each request.
- Removed `$finalState` from RequestFSM::__invoke
- Finishing FSM transitions is not handled in the FSM rather than the
  RingBridge.
- Slightly related to #964
2015-01-23 10:57:12 -08:00
Michael Dowling
14f66ae8fd URI template arrays always require a list of two elements. Closes #956 2015-01-11 15:52:51 -08:00
Michael Dowling
d86e62bee6 Removing extra check because PHP is broken 2015-01-11 14:23:16 -08:00
Michael Dowling
5f0c9f04cc Adding the ability to limit which redirect protocols are allowed. Closes #841 2014-12-19 12:22:50 -08:00
Michael Dowling
cd167aab57 Merge branch 'nested_futures' 2014-12-19 11:02:55 -08:00
Michael Dowling
e3182afcda Waiting on deep futuress when necessary to deal with retries.
This commit updates the request FSM to resolve deep futures to
ensure that retried synchronous requests are waited on correctly
and produce side-effects when expected. Previously the results of a
retried request were not being properly brought up to the outermost
layer when a client was attempting to dereference a future because the
request was not a future request.
Adding a way to get the number of retries to events
2014-12-19 10:59:24 -08:00
Liam O'Boyle
b2781f7537 Allow dynamic pool sizing.
Allows the number of requests allowed in a pool to vary over time by
retrieving the current pool size from a callback instead of a single
constant number.

This allows us to amend the number of requests ongoing according to our
needs, e.g. by responding to rate limiting information provided by an
upstream API.

Changes are

* Allow a callback to be passed in to specify the pool size instead of a
  constant pool size.
* As each request returns, add enough new requests to the queue to fill
  up to the current pool size limit.
2014-12-16 08:10:08 +11:00
Michael Dowling
8c931e3725 Setting a request option to null will ensure it is not set.
This commit makes it so that setting a request option to null will
ensure that the option is not set by the single request or as a result
of merging in default client settings (like being able to override proxy
on a one-off basis).
2014-12-09 17:06:35 -08:00
Michael Dowling
670220f70c Not forcing typehint and adding test to ensure URL and query string can be customized 2014-12-09 11:31:02 -08:00
Jamie Hannaford
914dac90ac Allow "0" (and any other falsy) URI paths 2014-12-09 13:59:58 +00:00
Michael Dowling
8467cfec77 Preventing infinite recursion in Pool.
When requests are intercepted in a Pool, it can result in infinite
recursion. This commit modifies the Pool to inspect the promise type of
a request to see if it was completed or not. If the request is completed
after sending, then we wait on the request to emit any pending events
and use `goto` to send the next request and prevent the stack from
growing.

Closes #905.
2014-11-16 23:43:56 -08:00
Michael Dowling
1330e3a1fe Query strings should be treated an un-encoded by default.
This change updates query strings so that they are treated as un-encoded
values by default where the value represents an un-encoded value to send
over the wire. A Query object then encodes the value before sending over
the wire. This means that even value query string values (e.g., ":") are
url encoded. This makes the Query class match PHP's http_build_query
function. However, if you want to send requests over the wire using
valid query string characters that do not need to be encoded, then you
can provide a string to Url::setQuery() and pass true as the second
argument to specify that the query string is a raw string that should
not be parsed or encoded (unless a call to getQuery() is subsequently
made, forcing the query-string to be converted into a Query object).
2014-11-03 23:04:06 -08:00
Michael Dowling
241611c4cd Improving URL encoding of path and query.
This commit updates path and query string encoding to better handle
strings that are already percent encoded, and now allows for all of the
characters valid for paths and queries specified in RFC 3986 to be
present in a URL without being encoded.
2014-10-30 16:52:02 -07:00