e.g:
params: array()
template: /path{?params*}
previous result: /path?params=
correct result: /path
Unfortunately PHP is unable to distinguish between an empty list array
and an empty associative array. However this doesn't matter, because the
empty case of either of these is considered "undefined" by the spec.
http://tools.ietf.org/html/draft-gregorio-uritemplate-08#section-2.3
A variable defined as a list value is considered undefined if the
list contains zero members. A variable defined as an associative
array of (name, value) pairs is considered undefined if the array
contains zero members or if all member names in the array are
associated with undefined values.
http://tools.ietf.org/html/draft-gregorio-uritemplate-08#section-3.2.1
A variable that is undefined (Section 2.3) has no value and is
ignored by the expansion process. If all of the variables in an
expression are undefined, then the expression's expansion is the
empty string.
Retrieving a DELETE request from a client or request factory will now
return an EntityEnclosingRequestInterface object.
Cleaned up the CurlHandle::factory method.
Closes#118 (thanks to @zachbadgett for inspiration)
position to it's previous position any time a seek is made for a
temporary operation (e.g. __toString(), getContentLength(),
getContentMd()).
Cleaning up how compression offsets are handled
[Http] Adding the ability to consume request entity bodies when mocked
by the
MockPlugin
[Http] Fixing an offset error in the ReadLimitEntityBody
Only returning a subset of the body when calling __toString() on a
ReadLimitEntityBody
According to RFC1738 (implemented by urlencode) spaces are encoded as
plus symbols. However, RFC3986 (imeplemented by rawurlencode) states
that spaces should be encoded as '%20'.
When parsing a query string that was encoded with urlencode we should
treat plus symbols as spaces.
fixes#105
An example of this would be:
<param name="curl.CURLOPT_CONNECTTIMEOUT" default="100" />
This would override the configuration set by the instantiation:
new Client(
'http://www.example.com',
array('curl.CURLOPT_CONNECTTIMEOUT' => 100)
);
The responsibility of setting a Content-Length of 0 for an empty EntityEnclosingRequest is now handled in the setState method of an EntityEnclosingRequest
Removing the action argument from Guzzle\Http\Message\AbstractMessage::changedHeader()
Passing an array of Cache-Control data in the Cache-Control header instead of the unnecessary implode
Removing process as an argument for Guzzle\Http\Message\EntityEnclosingRequest::addPostField
Enforcing the decision of whether or not to URL encode POST data in the CurlHandle class
Closes#95
- Adds a trailing equal sign for empty values by default (e.g. ?acl=)
- Set blank values (e.g. ?acl) by setting the value to QueryString::BLANK
- Combined URL encoding into a single option rather than separate
settings for fields and values
- Changed isEncodingValues() and isEncodingFields() to isUrlEncoding()
- Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
- Changed the aggregation functions of QueryString to be static methods
- Can now use fromString() with querystrings that have a leading ?
Suppose that we set the following data on a QueryString object:
array(
'foo' => null,
'bar' => 'test',
)
The query string before and after this change would be:
BEFORE: ?foo&bar=test
AFTER: ?foo=&bar=test
The importance is that before the lack of "=" resulted made it look like there was only a single parameter called "foo&bar" with a value of "test" (i.e. the bar parameter is joined with foo).
Not caching requests other than GET and HEAD by default. Adding the ability to
use a custom filter strategy to determine if a request can be cached. Closes#91