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