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

1229 Commits

Author SHA1 Message Date
Michael Dowling
7998fbdbcb Removing the bundled CA bundle completely
I've now removed the bundled CA bundle and will scan for a
CA bundle when using the PHP stream wrapper on PHP < 5.6.
This change will still work out of the box for most users,
but may require users on Mac or Windows to manually configure
a CA bundle using the `verify` request option or the
openssl.cafile ini setting.
2014-09-08 21:33:32 -07:00
Michael Dowling
e9c74c257e Using the system CA bundle by default when possible
This commit updates Guzzle to use the CA bundle packaged on the
system by default when possible. cURL will use the system CA
bundle without issue, however, PHP 5.5 and lower will still
default to the bundled CA cert. You can now pass "bundled" to
use the cacert file bundled with Guzzle.
2014-09-08 21:33:32 -07:00
Michael Dowling
64fcc4b37c Changing content-disposition order to match curl. Closes #799 2014-09-08 13:58:31 -07:00
Michael Dowling
7eff942469 Fixing CurlAdapter memory leak. Closes #813 2014-09-08 13:53:10 -07:00
Michael Dowling
f36ab448d0 Not using request_fulluri in stream adapter. Closes #791 2014-08-30 13:56:40 -07:00
Christer Gustavsson
89c13efceb Adding test for redirects with relative paths
Ensure that the relative path is added to url of the
previous request instead of always using the original
2014-08-27 16:39:09 +02:00
Michael Dowling
fa5e604019 Ensuring the stream adapter does not add a default content-type 2014-08-19 21:34:33 -07:00
Michael Dowling
e5f0b6b84d Added the ability to throw exceptions immediately.
Closes #760
2014-08-17 16:21:32 -07:00
Michael Dowling
90bd509464 Adding support for the decode_content request option
- MessageFactory and adapters now handle decode_content
- server.js now requires base64 encoded data in the "body" JSON parameter.
- Closes #764
2014-08-17 14:33:46 -07:00
Michael Dowling
7521b6529d No longer using namespace functions from stream package 2014-08-16 18:13:59 -07:00
Michael Dowling
ef1b0c3075 Merging in default headers case-insensitively. Closes #767 2014-08-14 23:03:39 -07:00
Michael Dowling
22f7e2decf Using the content-type to control whether multipart/form-data POSTs are made. Closes #768 2014-08-14 13:29:02 -07:00
Michael Dowling
af5107487e Properly encoding multipart/form-data fields that contain special characters. Closes #758 2014-08-06 13:33:33 -07:00
Reinier Kip
fd94f23a64 Test ampersand in multipart field value. 2014-08-06 13:27:00 +02:00
Michael Dowling
799cdf3646 Throwing when you attempt to use "stream" requests in parallel 2014-08-05 13:06:20 -07:00
Michael Dowling
ef7c7c7be4 No longer allowing curl to add a default content-type in the adapter layer 2014-08-04 13:28:32 -07:00
Michael Dowling
f221563b4e Fixing an issue with the history plugin 2014-08-03 16:46:03 -07:00
Michael Dowling
b8ca88c797 Making it easier to represent parts of a message as a string 2014-08-03 09:59:59 -07:00
Michael Dowling
2b90245038 Merge branch 'no-rewind-fix' 2014-08-02 15:48:29 -07:00
Michael Dowling
fbf2bf6dbd Allowing mulitple event subscriber listeners to be registered per event name 2014-08-02 15:35:17 -07:00
Michael Dowling
d68dc43283 Accounting for random connection issues in multi-adapter
This commit updates the MultiAdapter to account for connecitons
being closed unexpectedly and then retried. When this occurs, curl
attempts to rewind the stream before sending. Because we use a
callback function to stream large payloads, curl fails to rewind
the stream and fails the transaction without associating the correct
error code. This commit checks if a transaction has a response
before processing. If a transaction doesn't have a response, then
we attempt to retry the request transparently (without emitting
another set of before events, essentially doing exactly what
curl would have done if it was possible to rewind the stream). If
the request did not have a body, then an error event is emitted as
it is a very weird error. If the request had a body but wasn't
rewindable, then an error event is emitted. If the request had a
body and a rewindable stream, then it is rewound and retried.

This change also updates the MultiAdapter and BatchContext to
transfer until the number of open handles in the BatchContext
reaches 0. This removes some complexity from the main transfer loop
that had to account for pending transactions.

Closes #710
2014-07-31 21:02:29 -07:00
Graham Campbell
1080a9a8b3 Removed whitespace in a test 2014-07-26 12:54:40 +01:00
Michael Dowling
f74931ee9f Fixing bug in serialzing POST requests 2014-07-22 17:48:20 -07:00
Michael Dowling
5ab8c29546 Does not create a save_to stream until it is used. Closes #715 2014-07-19 12:17:17 -07:00
Michael Dowling
9a0a38096c Merge pull request #736 from jamiehannaford/url-combine-0-fix
Ensuring that '0' paths can be combined into empty URLs
2014-07-18 10:22:02 -07:00
Jamie Hannaford
0bfd7230a0 Ensuring that '0' paths can be combined into empty URLs 2014-07-16 13:30:30 +02:00
Michael Dowling
2c7cc07ba8 Merge remote-tracking branch 'pdt256/master'
Conflicts:
	src/Post/PostBody.php
2014-07-15 18:36:35 -07:00
Jamie Isaacs
4166ecbe79 Allowing PostBody to support multipart/form-data with base64 encoded strings 2014-07-15 17:20:00 -07:00
Michael Dowling
14f0873442 Lots of fixes to multipart/form-data
Using the AppendStream to vastly clean up how a multipart POST is created.
This changes also cleans up how the body is sent over the wire, eliminating
some bugs I discovered when fields are sent before files.
2014-07-15 15:50:36 -07:00
Michael Dowling
11810f6895 Fixing an issue with generating event arrays and adding missing tests 2014-07-14 16:34:23 -07:00
Michael Dowling
20c10129c3 Fix to ensure that repeated values are parsed correctly 2014-07-11 17:54:10 -07:00
Michael Dowling
c97511c0d7 Adding more robust query string parsing.
This commit adds a QueryParser class that is able to perform much more
robust query parsing. The query parser can track whether or not to use
a duplicate aggregator and whether or not to use numeric indices in
mutli-value key value pairs. You can now control how the query string
is url-decoded when parsing as well as disable url-decoding.

This change addresses nested key value pairs using 'a[b][c]=d' syntax
such that when parsed, will produce nested arrays containing
`['a' => ['b' => ['c' => 'd']]]`. This gets Guzzle query strings more
like PHP's parse_str().

This change closes #730 and closes #731 dealing with multipart POST
requests stripping "+" signs from values. POST key value pairs for
multipart requests are no longer modified at all, but rather sent over
the wire exactly as given.
2014-07-11 17:25:13 -07:00
Michael Dowling
49a14b2bbc Not applying POST headers until sending
Closes #706. This commit makes it so that POST headers are not
applied until sending a request. This allows you to do things like
change the query aggregator used before sending a request.
2014-07-07 22:30:38 -07:00
Michael Dowling
0016a005d7 Fixing multi-value header issue with StreamAdapter
Closes #725
2014-07-07 21:38:13 -07:00
Michael Dowling
16767bf79a Fixing a slash URL normalization issue
When using multiple slashes in URLs, normalization caused them to be combined
into a single slash. This commit fixes that issue to work exactly how Chrome
handles these types of URLs. Closes #713.
2014-07-07 16:06:31 -07:00
Jamie Hannaford
597ca11dd1 Make sure path leading slashes aren't added for empty hosts 2014-07-07 16:04:35 +02:00
Michael Dowling
4d3751d8e0 Adding support for GET requests with body 2014-06-11 21:01:44 -07:00
Fred Emmott
4db19b75d9 Change port used for unit tests
The purpose here is to allow running guzzle3 and guzzle4 tests at the
same time, on the same machine. This is needed for
http://hhvm.com/frameworks/ to work correctly. Ideally we'll make these
more isolated in the future, but this should be an unobtrusive
short-term fix.
2014-06-09 10:18:36 -07:00
Michael Dowling
83a8997158 Implementing toArray() on CookieJar
Adding the ability to create a cookie jar and pass in an array of cookies.
2014-06-07 11:53:47 -07:00
Michael Dowling
7ad15b806f Merge remote-tracking branch 'larowlan/multipart-forms' into fix-multipart-nested 2014-06-04 14:30:46 -07:00
Michael Dowling
6a871f2ba8 Adding a fix to ensure that POST requests can use the json option correctly 2014-06-04 11:17:31 -07:00
floriansemm
9990d52093 failing tests for json post request 2014-06-04 08:35:25 +02:00
Lee Rowlands
7f20c86fb7 Fail demonstrating nested form-fields 2014-06-04 09:02:56 +10:00
Michael Dowling
715a433100 Adding test to ensure adding new message factory options works 2014-06-03 09:43:15 -07:00
Michael Dowling
6503778ae0 Some small HHVM hacks. See #538 2014-05-27 21:58:05 -07:00
Michael Dowling
03e9793efe Added setPort and getPort to RequestInterface.
- Removed request method constants from RequestInterface
- Closes #680
2014-05-27 21:16:50 -07:00
Michael Dowling
dd5eceed5d Adding a json_decode wrapper to functions.php 2014-05-27 10:52:13 -07:00
Michael Dowling
3db1dc3145 Adding the json request option
- Adding the json request option to provide better symmetry
  between request and response APIs.
- Updating the quickstart guide and documentation.
- Closes #674
2014-05-18 12:47:07 -07:00
Jeremy Lindblom
a0146ced57 Extracted the event/listener management portion of the TransactionIterator into a trait. 2014-04-30 13:46:07 -07:00
MarkBaker
71375c1554 Merge remote-tracking branch 'upstream/master' 2014-04-21 23:42:40 +01:00