1ChangeLog 2========= 3 44.2.4 (2018-02-23) 5------------------ 6 7* #69: Sending `charset="UTF-8"` on Basic authentication challenges per 8 [rfc7617][rfc7617]. 9 10 114.2.3 (2017-06-12) 12------------------ 13 14* #74, #77: Work around 4GB file size limit at 32 Bit systems 15 16 174.2.2 (2017-01-02) 18------------------ 19 20* #72: Handling clients that send invalid `Content-Length` headers. 21 224.2.1 (2016-01-06) 23------------------ 24 25* #56: `getBodyAsString` now returns at most as many bytes as the contents of 26 the `Content-Length` header. This allows users to pass much larger strings 27 without having to copy and truncate them. 28* The client now sets a default `User-Agent` header identifying this library. 29 30 314.2.0 (2016-01-04) 32------------------ 33 34* This package now supports sabre/event 3.0. 35 36 374.1.0 (2015-09-04) 38------------------ 39 40* The async client wouldn't `wait()` for new http requests being started 41 after the (previous) last request in the queue was resolved. 42* Added `Sabre\HTTP\Auth\Bearer`, to easily extract a OAuth2 bearer token. 43 44 454.0.0 (2015-05-20) 46------------------ 47 48* Deprecated: All static functions from `Sabre\HTTP\URLUtil` and 49 `Sabre\HTTP\Util` moved to a separate `functions.php`, which is also 50 autoloaded. The old functions are still there, but will be removed in a 51 future version. (#49) 52 53 544.0.0-alpha3 (2015-05-19) 55------------------------- 56 57* Added a parser for the HTTP `Prefer` header, as defined in [RFC7240][rfc7240]. 58* Deprecated `Sabre\HTTP\Util::parseHTTPDate`, use `Sabre\HTTP\parseDate()`. 59* Deprecated `Sabre\HTTP\Util::toHTTPDate` use `Sabre\HTTP\toDate()`. 60 61 624.0.0-alpha2 (2015-05-18) 63------------------------- 64 65* #45: Don't send more data than what is promised in the HTTP content-length. 66 (@dratini0). 67* #43: `getCredentials` returns null if incomplete. (@Hywan) 68* #48: Now using php-cs-fixer to make our CS consistent (yay!) 69* This includes fixes released in version 3.0.5. 70 71 724.0.0-alpha1 (2015-02-25) 73------------------------- 74 75* #41: Fixing bugs related to comparing URLs in `Request::getPath()`. 76* #41: This library now uses the `sabre/uri` package for uri handling. 77* Added `421 Misdirected Request` from the HTTP/2.0 spec. 78 79 803.0.5 (2015-05-11) 81------------------ 82 83* #47 #35: When re-using the client and doing any request after a `HEAD` 84 request, the client discards the body. 85 86 873.0.4 (2014-12-10) 88------------------ 89 90* #38: The Authentication helpers no longer overwrite any existing 91 `WWW-Authenticate` headers, but instead append new headers. This ensures 92 that multiple authentication systems can exist in the same environment. 93 94 953.0.3 (2014-12-03) 96------------------ 97 98* Hiding `Authorization` header value from `Request::__toString`. 99 100 1013.0.2 (2014-10-09) 102------------------ 103 104* When parsing `Accept:` headers, we're ignoring invalid parts. Before we 105 would throw a PHP E_NOTICE. 106 107 1083.0.1 (2014-09-29) 109------------------ 110 111* Minor change in unittests. 112 113 1143.0.0 (2014-09-23) 115------------------ 116 117* `getHeaders()` now returns header values as an array, just like psr/http. 118* Added `hasHeader()`. 119 120 1212.1.0-alpha1 (2014-09-15) 122------------------------- 123 124* Changed: Copied most of the header-semantics for the PSR draft for 125 representing HTTP messages. [Reference here][psr-http]. 126* This means that `setHeaders()` does not wipe out every existing header 127 anymore. 128* We also support multiple headers with the same name. 129* Use `Request::getHeaderAsArray()` and `Response::getHeaderAsArray()` to 130 get a hold off multiple headers with the same name. 131* If you use `getHeader()`, and there's more than 1 header with that name, we 132 concatenate all these with a comma. 133* `addHeader()` will now preserve an existing header with that name, and add a 134 second header with the same name. 135* The message class should be a lot faster now for looking up headers. No more 136 array traversal, because we maintain a tiny index. 137* Added: `URLUtil::resolve()` to make resolving relative urls super easy. 138* Switched to PSR-4. 139* #12: Circumventing CURL's FOLLOW_LOCATION and doing it in PHP instead. This 140 fixes compatibility issues with people that have open_basedir turned on. 141* Added: Content negotiation now correctly support mime-type parameters such as 142 charset. 143* Changed: `Util::negotiate()` is now deprecated. Use 144 `Util::negotiateContentType()` instead. 145* #14: The client now only follows http and https urls. 146 147 1482.0.4 (2014-07-14) 149------------------ 150 151* Changed: No longer escaping @ in urls when it's not needed. 152* Fixed: #7: Client now correctly deals with responses without a body. 153 154 1552.0.3 (2014-04-17) 156------------------ 157 158* Now works on hhvm! 159* Fixed: Now throwing an error when a Request object is being created with 160 arguments that were valid for sabre/http 1.0. Hopefully this will aid with 161 debugging for upgraders. 162 163 1642.0.2 (2014-02-09) 165------------------ 166 167* Fixed: Potential security problem in the client. 168 169 1702.0.1 (2014-01-09) 171------------------ 172 173* Fixed: getBodyAsString on an empty body now works. 174* Fixed: Version string 175 176 1772.0.0 (2014-01-08) 178------------------ 179 180* Removed: Request::createFromPHPRequest. This is now handled by 181 Sapi::getRequest. 182 183 1842.0.0alpha6 (2014-01-03) 185------------------------ 186 187* Added: Asynchronous HTTP client. See examples/asyncclient.php. 188* Fixed: Issue #4: Don't escape colon (:) when it's not needed. 189* Fixed: Fixed a bug in the content negotation script. 190* Fixed: Fallback for when CURLOPT_POSTREDIR is not defined (mainly for hhvm). 191* Added: The Request and Response object now have a `__toString()` method that 192 serializes the objects into a standard HTTP message. This is mainly for 193 debugging purposes. 194* Changed: Added Response::getStatusText(). This method returns the 195 human-readable HTTP status message. This part has been removed from 196 Response::getStatus(), which now always returns just the status code as an 197 int. 198* Changed: Response::send() is now Sapi::sendResponse($response). 199* Changed: Request::createFromPHPRequest is now Sapi::getRequest(). 200* Changed: Message::getBodyAsStream and Message::getBodyAsString were added. The 201 existing Message::getBody changed it's behavior, so be careful. 202 203 2042.0.0alpha5 (2013-11-07) 205------------------------ 206 207* Added: HTTP Status 451 Unavailable For Legal Reasons. Fight government 208 censorship! 209* Added: Ability to catch and retry http requests in the client when a curl 210 error occurs. 211* Changed: Request::getPath does not return the query part of the url, so 212 everything after the ? is stripped. 213* Added: a reverse proxy example. 214 215 2162.0.0alpha4 (2013-08-07) 217------------------------ 218 219* Fixed: Doing a GET request with the client uses the last used HTTP method 220 instead. 221* Added: HttpException 222* Added: The Client class can now automatically emit exceptions when HTTP errors 223 occurred. 224 225 2262.0.0alpha3 (2013-07-24) 227------------------------ 228 229* Changed: Now depends on sabre/event package. 230* Changed: setHeaders() now overwrites any existing http headers. 231* Added: getQueryParameters to RequestInterface. 232* Added: Util::negotiate. 233* Added: RequestDecorator, ResponseDecorator. 234* Added: A very simple HTTP client. 235* Added: addHeaders() to append a list of new headers. 236* Fixed: Not erroring on unknown HTTP status codes. 237* Fixed: Throwing exceptions on invalid HTTP status codes (not 3 digits). 238* Fixed: Much better README.md 239* Changed: getBody() now uses a bitfield to specify what type to return. 240 241 2422.0.0alpha2 (2013-07-02) 243------------------------ 244 245* Added: Digest & AWS Authentication. 246* Added: Message::getHttpVersion and Message::setHttpVersion. 247* Added: Request::setRawServerArray, getRawServerValue. 248* Added: Request::createFromPHPRequest 249* Added: Response::send 250* Added: Request::getQueryParameters 251* Added: Utility for dealing with HTTP dates. 252* Added: Request::setPostData and Request::getPostData. 253* Added: Request::setAbsoluteUrl and Request::getAbsoluteUrl. 254* Added: URLUtil, methods for calculation relative and base urls. 255* Removed: Response::sendBody 256 257 2582.0.0alpha1 (2012-10-07) 259------------------------ 260 261* Fixed: Lots of small naming improvements 262* Added: Introduction of Message, MessageInterface, Response, ResponseInterface. 263 264Before 2.0.0, this package was built-into SabreDAV, where it first appeared in 265January 2009. 266 267[psr-http]: https://github.com/php-fig/fig-standards/blob/master/proposed/http-message.md 268[rfc7240]: http://tools.ietf.org/html/rfc7240 269[rfc7617]: https://tools.ietf.org/html/rfc7617 270