1# Change Log 2 3 4All notable changes to this project will be documented in this file. 5 6The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 7and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 8 9 10## Unreleased 11 12## 1.8.5 - 2022-03-20 13 14### Fixed 15 16- Correct header value validation 17 18## 1.8.4 - 2022-03-20 19 20### Fixed 21 22- Validate header values properly 23 24## 1.8.3 - 2021-10-05 25 26### Fixed 27 28- Return `null` in caching stream size if remote size is `null` 29 30## 1.8.2 - 2021-04-26 31 32### Fixed 33 34- Handle possibly unset `url` in `stream_get_meta_data` 35 36## 1.8.1 - 2021-03-21 37 38### Fixed 39 40- Issue parsing IPv6 URLs 41- Issue modifying ServerRequest lost all its attributes 42 43## 1.8.0 - 2021-03-21 44 45### Added 46 47- Locale independent URL parsing 48- Most classes got a `@final` annotation to prepare for 2.0 49 50### Fixed 51 52- Issue when creating stream from `php://input` and curl-ext is not installed 53- Broken `Utils::tryFopen()` on PHP 8 54 55## 1.7.0 - 2020-09-30 56 57### Added 58 59- Replaced functions by static methods 60 61### Fixed 62 63- Converting a non-seekable stream to a string 64- Handle multiple Set-Cookie correctly 65- Ignore array keys in header values when merging 66- Allow multibyte characters to be parsed in `Message:bodySummary()` 67 68### Changed 69 70- Restored partial HHVM 3 support 71 72 73## [1.6.1] - 2019-07-02 74 75### Fixed 76 77- Accept null and bool header values again 78 79 80## [1.6.0] - 2019-06-30 81 82### Added 83 84- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244) 85- Added MIME type for WEBP image format (#246) 86- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272) 87 88### Changed 89 90- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262) 91- Accept port number 0 to be valid (#270) 92 93### Fixed 94 95- Fixed subsequent reads from `php://input` in ServerRequest (#247) 96- Fixed readable/writable detection for certain stream modes (#248) 97- Fixed encoding of special characters in the `userInfo` component of an URI (#253) 98 99 100## [1.5.2] - 2018-12-04 101 102### Fixed 103 104- Check body size when getting the message summary 105 106 107## [1.5.1] - 2018-12-04 108 109### Fixed 110 111- Get the summary of a body only if it is readable 112 113 114## [1.5.0] - 2018-12-03 115 116### Added 117 118- Response first-line to response string exception (fixes #145) 119- A test for #129 behavior 120- `get_message_body_summary` function in order to get the message summary 121- `3gp` and `mkv` mime types 122 123### Changed 124 125- Clarify exception message when stream is detached 126 127### Deprecated 128 129- Deprecated parsing folded header lines as per RFC 7230 130 131### Fixed 132 133- Fix `AppendStream::detach` to not close streams 134- `InflateStream` preserves `isSeekable` attribute of the underlying stream 135- `ServerRequest::getUriFromGlobals` to support URLs in query parameters 136 137 138Several other fixes and improvements. 139 140 141## [1.4.2] - 2017-03-20 142 143### Fixed 144 145- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing 146 calls to `trigger_error` when deprecated methods are invoked. 147 148 149## [1.4.1] - 2017-02-27 150 151### Added 152 153- Rriggering of silenced deprecation warnings. 154 155### Fixed 156 157- Reverted BC break by reintroducing behavior to automagically fix a URI with a 158 relative path and an authority by adding a leading slash to the path. It's only 159 deprecated now. 160 161 162## [1.4.0] - 2017-02-21 163 164### Added 165 166- Added common URI utility methods based on RFC 3986 (see documentation in the readme): 167 - `Uri::isDefaultPort` 168 - `Uri::isAbsolute` 169 - `Uri::isNetworkPathReference` 170 - `Uri::isAbsolutePathReference` 171 - `Uri::isRelativePathReference` 172 - `Uri::isSameDocumentReference` 173 - `Uri::composeComponents` 174 - `UriNormalizer::normalize` 175 - `UriNormalizer::isEquivalent` 176 - `UriResolver::relativize` 177 178### Changed 179 180- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. 181- Allow `parse_response` to parse a response without delimiting space and reason. 182- Ensure each URI modification results in a valid URI according to PSR-7 discussions. 183 Invalid modifications will throw an exception instead of returning a wrong URI or 184 doing some magic. 185 - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception 186 because the path of a URI with an authority must start with a slash "/" or be empty 187 - `(new Uri())->withScheme('http')` will return `'http://localhost'` 188 189### Deprecated 190 191- `Uri::resolve` in favor of `UriResolver::resolve` 192- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` 193 194### Fixed 195 196- `Stream::read` when length parameter <= 0. 197- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. 198- `ServerRequest::getUriFromGlobals` when `Host` header contains port. 199- Compatibility of URIs with `file` scheme and empty host. 200 201 202## [1.3.1] - 2016-06-25 203 204### Fixed 205 206- `Uri::__toString` for network path references, e.g. `//example.org`. 207- Missing lowercase normalization for host. 208- Handling of URI components in case they are `'0'` in a lot of places, 209 e.g. as a user info password. 210- `Uri::withAddedHeader` to correctly merge headers with different case. 211- Trimming of header values in `Uri::withAddedHeader`. Header values may 212 be surrounded by whitespace which should be ignored according to RFC 7230 213 Section 3.2.4. This does not apply to header names. 214- `Uri::withAddedHeader` with an array of header values. 215- `Uri::resolve` when base path has no slash and handling of fragment. 216- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the 217 key/value both in encoded as well as decoded form to those methods. This is 218 consistent with withPath, withQuery etc. 219- `ServerRequest::withoutAttribute` when attribute value is null. 220 221 222## [1.3.0] - 2016-04-13 223 224### Added 225 226- Remaining interfaces needed for full PSR7 compatibility 227 (ServerRequestInterface, UploadedFileInterface, etc.). 228- Support for stream_for from scalars. 229 230### Changed 231 232- Can now extend Uri. 233 234### Fixed 235- A bug in validating request methods by making it more permissive. 236 237 238## [1.2.3] - 2016-02-18 239 240### Fixed 241 242- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote 243 streams, which can sometimes return fewer bytes than requested with `fread`. 244- Handling of gzipped responses with FNAME headers. 245 246 247## [1.2.2] - 2016-01-22 248 249### Added 250 251- Support for URIs without any authority. 252- Support for HTTP 451 'Unavailable For Legal Reasons.' 253- Support for using '0' as a filename. 254- Support for including non-standard ports in Host headers. 255 256 257## [1.2.1] - 2015-11-02 258 259### Changes 260 261- Now supporting negative offsets when seeking to SEEK_END. 262 263 264## [1.2.0] - 2015-08-15 265 266### Changed 267 268- Body as `"0"` is now properly added to a response. 269- Now allowing forward seeking in CachingStream. 270- Now properly parsing HTTP requests that contain proxy targets in 271 `parse_request`. 272- functions.php is now conditionally required. 273- user-info is no longer dropped when resolving URIs. 274 275 276## [1.1.0] - 2015-06-24 277 278### Changed 279 280- URIs can now be relative. 281- `multipart/form-data` headers are now overridden case-insensitively. 282- URI paths no longer encode the following characters because they are allowed 283 in URIs: "(", ")", "*", "!", "'" 284- A port is no longer added to a URI when the scheme is missing and no port is 285 present. 286 287 288## 1.0.0 - 2015-05-19 289 290Initial release. 291 292Currently unsupported: 293 294- `Psr\Http\Message\ServerRequestInterface` 295- `Psr\Http\Message\UploadedFileInterface` 296 297 298 299[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 300[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 301[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 302[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 303[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 304[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 305[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 306[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 307[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 308[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 309[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 310[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 311[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 312[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 313