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

12 Commits

Author SHA1 Message Date
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
Michael Dowling
668209c895 Getting tests working again. Removing more fluent interfaces.
Removing more fluent interfaces to make it easier to decorate
classes.
2014-09-08 21:35:11 -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
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
b30ce5d514 Making clients more immutable
- Removing getConfig() and setConfig() from clients to avoid confusion around
  whether things like base_url, message_factory, etc should be able to be
  retrieved from getConfig() or modified using setConfig().
- Adding getDefaults() and setDefaultValue() to customize default request
  options of a client.
- Updating Url class to check if a scheme and host are set before adding
  ":" and "//". This allows empty Url (e.g., "") to be serialized as "".
- Removing dead code from Url class.
- Adding a functions.php function for get_path and set_path so that these
  functions can be used on regular PHP arrays. Collection now proxies to these
  functions when Collection::(get|set)Path() is called.
- Resolves #599.
2014-03-21 12:37:32 -07:00
Michael Dowling
6427687b6e Adding a test to ensure that the scheme updates the port correctly 2014-03-06 09:33:00 -08:00
Michael Dowling
7fcf225d0e Fixing dot segment removal, how absolute URLs are detected, the namespace used for functions.php, and how segments of a path are returned 2014-02-21 11:47:05 -08:00
Michael Dowling
ae89ca3566 Fixing RFC 3986 URL resolution and dot-segments
Url::combine() now returns a new Url instance.
2014-02-19 15:28:22 -08:00
Michael Dowling
2b779dccb3 Moving some things like query and url up a NS 2014-02-16 21:02:54 -08:00