3 All notable changes to this project will be documented in this file, in reverse chronological order by release.
13 - [#293](https://github.com/zendframework/zend-diactoros/pull/293) updates
14 `Uri::getHost()` to cast the value via `strtolower()` before returning it.
15 While this represents a change, it is fixing a bug in our implementation:
16 the PSR-7 specification for the method, which follows IETF RFC 3986 section
17 3.2.2, requires that the host name be normalized to lowercase.
29 - [#290](https://github.com/zendframework/zend-diactoros/pull/290) fixes
30 `Stream::getSize()` such that it checks that the result of `fstat` was
31 succesful before attempting to return its `size` member; in the case of an
32 error, it now returns `null`.
38 - [#285](https://github.com/zendframework/zend-diactoros/pull/285) adds a new
39 custom response type, `Zend\Diactoros\Response\XmlResponse`, for generating
40 responses representing XML. Usage is the same as with the `HtmlResponse` or
41 `TextResponse`; the response generated will have a `Content-Type:
42 application/xml` header by default.
44 - [#280](https://github.com/zendframework/zend-diactoros/pull/280) adds the
45 response status code/phrase pairing "103 Early Hints" to the
46 `Response::$phrases` property. This is a new status proposed via
47 [RFC 8297](https://datatracker.ietf.org/doc/rfc8297/).
49 - [#279](https://github.com/zendframework/zend-diactoros/pull/279) adds explicit
50 support for PHP 7.2; previously, we'd allowed build failures, though none
51 occured; we now require PHP 7.2 builds to pass.
77 - [#273](https://github.com/zendframework/zend-diactoros/pull/273) updates each
78 of the SAPI emitter implementations to emit the status line after emitting
79 other headers; this is done to ensure that the status line is not overridden
92 - [#273](https://github.com/zendframework/zend-diactoros/pull/273) modifies how
93 the `SapiEmitterTrait` calls `header()` to ensure that a response code is
94 _always_ passed as the third argument; this is done to prevent PHP from
95 silently overriding it.
105 - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the
106 behavior of `Zend\Diactoros\Server`: it no longer creates an output buffer.
108 - [#270](https://github.com/zendframework/zend-diactoros/pull/270) changes the
109 behavior of the two SAPI emitters in two backwards-incompatible ways:
111 - They no longer auto-inject a `Content-Length` header. If you need this
112 functionality, zendframework/zend-expressive-helpers 4.1+ provides it via
113 `Zend\Expressive\Helper\ContentLengthMiddleware`.
115 - They no longer flush the output buffer. Instead, if headers have been sent,
116 or the output buffer exists and has a non-zero length, the emitters raise an
117 exception, as mixed PSR-7/output buffer content creates a blocking issue.
118 If you are emitting content via `echo`, `print`, `var_dump`, etc., or not
119 catching PHP errors or exceptions, you will need to either fix your
120 application to always work with a PSR-7 response, or provide your own
121 emitters that allow mixed output mechanisms.
135 ## 1.5.0 - 2017-08-22
139 - [#205](https://github.com/zendframework/zend-diactoros/pull/205) adds support
142 - [#250](https://github.com/zendframework/zend-diactoros/pull/250) adds a new
143 API to `JsonResponse` to avoid the need for decoding the response body in
144 order to make changes to the underlying content. New methods include:
145 - `getPayload()`: retrieve the unencoded payload.
146 - `withPayload($data)`: create a new instance with the given data.
147 - `getEncodingOptions()`: retrieve the flags to use when encoding the payload
149 - `withEncodingOptions(int $encodingOptions)`: create a new instance that uses
150 the provided flags when encoding the payload to JSON.
154 - [#249](https://github.com/zendframework/zend-diactoros/pull/249) changes the
155 behavior of the various `Uri::with*()` methods slightly: if the value
156 represents no change, these methods will return the same instance instead of a
159 - [#248](https://github.com/zendframework/zend-diactoros/pull/248) changes the
160 behavior of `Uri::getUserInfo()` slightly: it now (correctly) returns the
161 percent-encoded values for the user and/or password, per RFC 3986 Section
162 3.2.1. `withUserInfo()` will percent-encode values, using a mechanism that
163 prevents double-encoding.
165 - [#243](https://github.com/zendframework/zend-diactoros/pull/243) changes the
166 exception messages thrown by `UploadedFile::getStream()` and `moveTo()` when
167 an upload error exists to include details about the upload error.
169 - [#233](https://github.com/zendframework/zend-diactoros/pull/233) adds a new
170 argument to `SapiStreamEmitter::emit`, `$maxBufferLevel` **between** the
171 `$response` and `$maxBufferLength` arguments. This was done because the
172 `Server::listen()` method passes only the response and `$maxBufferLevel` to
173 emitters; previously, this often meant that streams were being chunked 2 bytes
174 at a time versus the expected default of 8kb.
176 If you were calling the `SapiStreamEmitter::emit()` method manually
177 previously, you will need to update your code.
185 - [#205](https://github.com/zendframework/zend-diactoros/pull/205) and
186 [#243](https://github.com/zendframework/zend-diactoros/pull/243) **remove
187 support for PHP versions prior to 5.6 as well as HHVM**.
191 - [#248](https://github.com/zendframework/zend-diactoros/pull/248) fixes how the
192 `Uri` class provides user-info within the URI authority; the value is now
193 correctly percent-encoded , per RFC 3986 Section 3.2.1.
195 ## 1.4.1 - 2017-08-17
207 - [#260](https://github.com/zendframework/zend-diactoros/pull/260) removes
208 support for HHVM, as tests have failed against it for some time.
212 - [#247](https://github.com/zendframework/zend-diactoros/pull/247) fixes the
213 `Stream` and `RelativeStream` `__toString()` method implementations to check
214 if the stream `isSeekable()` before attempting to `rewind()` it, ensuring that
215 the method does not raise exceptions (PHP does not allow exceptions in that
216 method). In particular, this fixes an issue when using AWS S3 streams.
218 - [#252](https://github.com/zendframework/zend-diactoros/pull/252) provides a
219 fix to the `SapiEmitterTrait` to ensure that any `Set-Cookie` headers in the
220 response instance do not override those set by PHP when a session is created
223 - [#257](https://github.com/zendframework/zend-diactoros/pull/257) provides a
224 fix for the `PhpInputStream::read()` method to ensure string content that
225 evaluates as empty (including `0`) is still cached.
227 - [#258](https://github.com/zendframework/zend-diactoros/pull/258) updates the
228 `Uri::filterPath()` method to allow parens within a URI path, per [RFC 3986
229 section 3.3](https://tools.ietf.org/html/rfc3986#section-3.3) (parens are
230 within the character set "sub-delims").
232 ## 1.4.0 - 2017-04-06
236 - [#219](https://github.com/zendframework/zend-diactoros/pull/219) adds two new
237 classes, `Zend\Diactoros\Request\ArraySerializer` and
238 `Zend\Diactoros\Response\ArraySerializer`. Each exposes the static methods
239 `toArray()` and `fromArray()`, allowing de/serialization of messages from and
242 - [#236](https://github.com/zendframework/zend-diactoros/pull/236) adds two new
243 constants to the `Response` class: `MIN_STATUS_CODE_VALUE` and
244 `MAX_STATUS_CODE_VALUE`.
248 - [#240](https://github.com/zendframework/zend-diactoros/pull/240) changes the
249 behavior of `ServerRequestFactory::fromGlobals()` when no `$cookies` argument
250 is present. Previously, it would use `$_COOKIES`; now, if a `Cookie` header is
251 present, it will parse and use that to populate the instance instead.
253 This change allows utilizing cookies that contain period characters (`.`) in
254 their names (PHP's built-in cookie handling renames these to replace `.` with
255 `_`, which can lead to synchronization issues with clients).
257 - [#235](https://github.com/zendframework/zend-diactoros/pull/235) changes the
258 behavior of `Uri::__toString()` to better follow proscribed behavior in PSR-7.
259 In particular, prior to this release, if a scheme was missing but an authority
260 was present, the class was incorrectly returning a value that did not include
261 a `//` prefix. As of this release, it now does this correctly.
275 ## 1.3.11 - 2017-04-06
283 - [#241](https://github.com/zendframework/zend-diactoros/pull/241) changes the
284 constraint by which the package provides `psr/http-message-implementation` to
285 simply `1.0` instead of `~1.0.0`, to follow how other implementations provide
298 - [#161](https://github.com/zendframework/zend-diactoros/pull/161) adds
299 additional validations to header names and values to ensure no malformed values
302 - [#234](https://github.com/zendframework/zend-diactoros/pull/234) fixes a
303 number of reason phrases in the `Response` instance, and adds automation from
304 the canonical IANA sources to ensure any new phrases added are correct.
306 ## 1.3.10 - 2017-01-23
322 - [#226](https://github.com/zendframework/zend-diactoros/pull/226) fixed an
323 issue with the `SapiStreamEmitter` causing the response body to be cast
324 to `(string)` and also be read as a readable stream, potentially producing
327 ## 1.3.9 - 2017-01-17
343 - [#223](https://github.com/zendframework/zend-diactoros/issues/223)
344 [#224](https://github.com/zendframework/zend-diactoros/pull/224) fixed an issue
345 with the `SapiStreamEmitter` consuming too much memory when producing output
348 ## 1.3.8 - 2017-01-05
364 - [#222](https://github.com/zendframework/zend-diactoros/pull/222) fixes the
365 `SapiStreamEmitter`'s handling of the `Content-Range` header to properly only
366 emit a range of bytes if the header value is in the form `bytes {first-last}/length`.
367 This allows using other range units, such as `items`, without incorrectly
368 emitting truncated content.
370 ## 1.3.7 - 2016-10-11
374 - [#208](https://github.com/zendframework/zend-diactoros/pull/208) adds several
375 missing response codes to `Zend\Diactoros\Response`, including:
377 - 308 ('Permanent Redirect')
378 - 444 ('Connection Closed Without Response')
379 - 499 ('Client Closed Request')
380 - 510 ('Not Extended')
381 - 599 ('Network Connect Timeout Error')
382 - [#211](https://github.com/zendframework/zend-diactoros/pull/211) adds support
383 for UTF-8 characters in query strings handled by `Zend\Diactoros\Uri`.
397 ## 1.3.6 - 2016-09-07
401 - [#170](https://github.com/zendframework/zend-diactoros/pull/170) prepared
402 documentation for publication at https://zendframework.github.io/zend-diactoros/
403 - [#165](https://github.com/zendframework/zend-diactoros/pull/165) adds support
404 for Apache `REDIRECT_HTTP_*` header detection in the `ServerRequestFactory`.
405 - [#166](https://github.com/zendframework/zend-diactoros/pull/166) adds support
406 for UTF-8 characters in URI paths.
407 - [#204](https://github.com/zendframework/zend-diactoros/pull/204) adds testing
408 against PHP 7.1 release-candidate builds.
420 - [#186](https://github.com/zendframework/zend-diactoros/pull/186) fixes a typo
421 in a variable name within the `SapiStreamEmitter`.
422 - [#200](https://github.com/zendframework/zend-diactoros/pull/200) updates the
423 `SapiStreamEmitter` to implement a check for `isSeekable()` prior to attempts
424 to rewind; this allows it to work with non-seekable streams such as the
426 - [#169](https://github.com/zendframework/zend-diactoros/pull/169) ensures that
427 response serialization always provides a `\r\n\r\n` sequence following the
428 headers, even when no message body is present, to ensure it conforms with RFC
430 - [#175](https://github.com/zendframework/zend-diactoros/pull/175) updates the
431 `Request` class to set the `Host` header from the URI host if no header is
432 already present. (Ensures conformity with PSR-7 specification.)
433 - [#197](https://github.com/zendframework/zend-diactoros/pull/197) updates the
434 `Uri` class to ensure that string serialization does not include a colon after
435 the host name if no port is present in the instance.
437 ## 1.3.5 - 2016-03-17
453 - [#160](https://github.com/zendframework/zend-diactoros/pull/160) fixes HTTP
454 protocol detection in the `ServerRequestFactory` to work correctly with HTTP/2.
456 ## 1.3.4 - 2016-03-17
460 - [#119](https://github.com/zendframework/zend-diactoros/pull/119) adds the 451
461 (Unavailable for Legal Reasons) status code to the `Response` class.
473 - [#117](https://github.com/zendframework/zend-diactoros/pull/117) provides
474 validation of the HTTP protocol version.
475 - [#127](https://github.com/zendframework/zend-diactoros/pull/127) now properly
476 removes attributes with `null` values when calling `withoutAttribute()`.
477 - [#132](https://github.com/zendframework/zend-diactoros/pull/132) updates the
478 `ServerRequestFactory` to marshal the request path fragment, if present.
479 - [#142](https://github.com/zendframework/zend-diactoros/pull/142) updates the
480 exceptions thrown by `HeaderSecurity` to include the header name and/or
482 - [#148](https://github.com/zendframework/zend-diactoros/pull/148) fixes several
483 stream operations to ensure they raise exceptions when the internal pointer
484 is at an invalid position.
485 - [#151](https://github.com/zendframework/zend-diactoros/pull/151) ensures
486 URI fragments are properly encoded.
488 ## 1.3.3 - 2016-01-04
504 - [#135](https://github.com/zendframework/zend-diactoros/pull/135) fixes the
505 behavior of `ServerRequestFactory::marshalHeaders()` to no longer omit
506 `Cookie` headers from the aggregated headers. While the values are parsed and
507 injected into the cookie params, it's useful to have access to the raw headers
510 ## 1.3.2 - 2015-12-22
514 - [#124](https://github.com/zendframework/zend-diactoros/pull/124) adds four
515 more optional arguments to the `ServerRequest` constructor:
517 - `array $queryParams`
518 - `null|array|object $parsedBody`
519 - `string $protocolVersion`
520 `ServerRequestFactory` was updated to pass values for each of these parameters
521 when creating an instance, instead of using the related `with*()` methods on
534 - [#122](https://github.com/zendframework/zend-diactoros/pull/122) updates the
535 `ServerRequestFactory` to retrieve the HTTP protocol version and inject it in
536 the generated `ServerRequest`, which previously was not performed.
538 ## 1.3.1 - 2015-12-16
554 - [#113](https://github.com/zendframework/zend-diactoros/pull/113) fixes an
555 issue in the response serializer, ensuring that the status code in the
556 deserialized response is an integer.
557 - [#115](https://github.com/zendframework/zend-diactoros/pull/115) fixes an
558 issue in the various text-basd response types (`TextResponse`, `HtmlResponse`,
559 and `JsonResponse`); due to the fact that the constructor was not
560 rewinding the message body stream, `getContents()` was thus returning `null`,
561 as the pointer was at the end of the stream. The constructor now rewinds the
562 stream after populating it in the constructor.
564 ## 1.3.0 - 2015-12-15
568 - [#110](https://github.com/zendframework/zend-diactoros/pull/110) adds
569 `Zend\Diactoros\Response\SapiEmitterTrait`, which provides the following
570 private method definitions:
571 - `injectContentLength()`
576 The `SapiEmitter` implementation has been updated to remove those methods and
577 instead compose the trait.
578 - [#111](https://github.com/zendframework/zend-diactoros/pull/111) adds
579 a new emitter implementation, `SapiStreamEmitter`; this emitter type will
580 loop through the stream instead of emitting it in one go, and supports content
595 ## 1.2.1 - 2015-12-15
611 - [#101](https://github.com/zendframework/zend-diactoros/pull/101) fixes the
612 `withHeader()` implementation to ensure that if the header existed previously
613 but using a different casing strategy, the previous version will be removed
614 in the cloned instance.
615 - [#103](https://github.com/zendframework/zend-diactoros/pull/103) fixes the
616 constructor of `Response` to ensure that null status codes are not possible.
617 - [#99](https://github.com/zendframework/zend-diactoros/pull/99) fixes
618 validation of header values submitted via request and response constructors as
620 - numeric (integer and float) values are now properly allowed (this solves
621 some reported issues with setting Content-Length headers)
622 - invalid header names (non-string values or empty strings) now raise an
624 - invalid individual header values (non-string, non-numeric) now raise an
627 ## 1.2.0 - 2015-11-24
631 - [#88](https://github.com/zendframework/zend-diactoros/pull/88) updates the
632 `SapiEmitter` to emit a `Content-Length` header with the content length as
633 reported by the response body stream, assuming that
634 `StreamInterface::getSize()` returns an integer.
635 - [#77](https://github.com/zendframework/zend-diactoros/pull/77) adds a new
636 response type, `Zend\Diactoros\Response\TextResponse`, for returning plain
637 text responses. By default, it sets the content type to `text/plain;
638 charset=utf-8`; per the other response types, the signature is `new
639 TextResponse($text, $status = 200, array $headers = [])`.
640 - [#90](https://github.com/zendframework/zend-diactoros/pull/90) adds a new
641 `Zend\Diactoros\CallbackStream`, allowing you to back a stream with a PHP
642 callable (such as a generator) to generate the message content. Its
643 constructor accepts the callable: `$stream = new CallbackStream($callable);`
655 - [#77](https://github.com/zendframework/zend-diactoros/pull/77) updates the
656 `HtmlResponse` to set the charset to utf-8 by default (if no content type
657 header is provided at instantiation).
659 ## 1.1.4 - 2015-10-16
663 - [#98](https://github.com/zendframework/zend-diactoros/pull/98) adds
664 `JSON_UNESCAPED_SLASHES` to the default `json_encode` flags used by
665 `Zend\Diactoros\Response\JsonResponse`.
677 - [#96](https://github.com/zendframework/zend-diactoros/pull/96) updates
678 `withPort()` to allow `null` port values (indicating usage of default for
680 - [#91](https://github.com/zendframework/zend-diactoros/pull/91) fixes the
681 logic of `withUri()` to do a case-insensitive check for an existing `Host`
682 header, replacing it with the new one.
684 ## 1.1.3 - 2015-08-10
688 - [#73](https://github.com/zendframework/zend-diactoros/pull/73) adds caching of
689 the vendor directory to the Travis-CI configuration, to speed up builds.
701 - [#71](https://github.com/zendframework/zend-diactoros/pull/71) fixes the
702 docblock of the `JsonResponse` constructor to typehint the `$data` argument
704 - [#73](https://github.com/zendframework/zend-diactoros/pull/73) changes the
705 behavior in `Request` such that if it marshals a stream during instantiation,
706 the stream is marked as writeable (specifically, mode `wb+`).
707 - [#85](https://github.com/zendframework/zend-diactoros/pull/85) updates the
708 behavior of `Zend\Diactoros\Uri`'s various `with*()` methods that are
709 documented as accepting strings to raise exceptions on non-string input.
710 Previously, several simply passed non-string input on verbatim, others
711 normalized the input, and a few correctly raised the exceptions. Behavior is
712 now consistent across each.
713 - [#87](https://github.com/zendframework/zend-diactoros/pull/87) fixes
714 `UploadedFile` to ensure that `moveTo()` works correctly in non-SAPI
715 environments when the file provided to the constructor is a path.
717 ## 1.1.2 - 2015-07-12
733 - [#67](https://github.com/zendframework/zend-diactoros/pull/67) ensures that
734 the `Stream` class only accepts `stream` resources, not any resource.
736 ## 1.1.1 - 2015-06-25
752 - [#64](https://github.com/zendframework/zend-diactoros/pull/64) fixes the
753 behavior of `JsonResponse` with regards to serialization of `null` and scalar
754 values; the new behavior is to serialize them verbatim, without any casting.
756 ## 1.1.0 - 2015-06-24
760 - [#52](https://github.com/zendframework/zend-diactoros/pull/52),
761 [#58](https://github.com/zendframework/zend-diactoros/pull/58),
762 [#59](https://github.com/zendframework/zend-diactoros/pull/59), and
763 [#61](https://github.com/zendframework/zend-diactoros/pull/61) create several
764 custom response types for simplifying response creation:
766 - `Zend\Diactoros\Response\HtmlResponse` accepts HTML content via its
767 constructor, and sets the `Content-Type` to `text/html`.
768 - `Zend\Diactoros\Response\JsonResponse` accepts data to serialize to JSON via
769 its constructor, and sets the `Content-Type` to `application/json`.
770 - `Zend\Diactoros\Response\EmptyResponse` allows creating empty, read-only
771 responses, with a default status code of 204.
772 - `Zend\Diactoros\Response\RedirectResponse` allows specifying a URI for the
773 `Location` header in the constructor, with a default status code of 302.
775 Each also accepts an optional status code, and optional headers (which can
776 also be used to provide an alternate `Content-Type` in the case of the HTML
785 - [#43](https://github.com/zendframework/zend-diactoros/pull/43) removed both
786 `ServerRequestFactory::marshalUri()` and `ServerRequestFactory::marshalHostAndPort()`,
787 which were deprecated prior to the 1.0 release.
791 - [#29](https://github.com/zendframework/zend-diactoros/pull/29) fixes request
792 method validation to allow any valid token as defined by [RFC
793 7230](http://tools.ietf.org/html/rfc7230#appendix-B). This allows usage of
794 custom request methods, vs a static, hard-coded list.
796 ## 1.0.5 - 2015-06-24
812 - [#60](https://github.com/zendframework/zend-diactoros/pull/60) fixes
813 the behavior of `UploadedFile` when the `$errorStatus` provided at
814 instantiation is not `UPLOAD_ERR_OK`. Prior to the fix, an
815 `InvalidArgumentException` would occur at instantiation due to the fact that
816 the upload file was missing or invalid. With the fix, no exception is raised
817 until a call to `moveTo()` or `getStream()` is made.
819 ## 1.0.4 - 2015-06-23
821 This is a security release.
823 A patch has been applied to `Zend\Diactoros\Uri::filterPath()` that ensures that
824 paths can only begin with a single leading slash. This prevents the following
825 potential security issues:
827 - XSS vectors. If the URI path is used for links or form targets, this prevents
828 cases where the first segment of the path resembles a domain name, thus
829 creating scheme-relative links such as `//example.com/foo`. With the patch,
830 the leading double slash is reduced to a single slash, preventing the XSS
832 - Open redirects. If the URI path is used for `Location` or `Link` headers,
833 without a scheme and authority, potential for open redirects exist if clients
834 do not prepend the scheme and authority. Again, preventing a double slash
837 If you are using `Zend\Diactoros\Uri` for creating links, form targets, or
838 redirect paths, and only using the path segment, we recommend upgrading
843 - [#25](https://github.com/zendframework/zend-diactoros/pull/25) adds
844 documentation. Documentation is written in markdown, and can be converted to
845 HTML using [bookdown](http://bookdown.io). New features now MUST include
846 documentation for acceptance.
858 - [#51](https://github.com/zendframework/zend-diactoros/pull/51) fixes
859 `MessageTrait::getHeaderLine()` to return an empty string instead of `null` if
860 the header is undefined (which is the behavior specified in PSR-7).
861 - [#57](https://github.com/zendframework/zend-diactoros/pull/57) fixes the
862 behavior of how the `ServerRequestFactory` marshals upload files when they are
863 represented as a nested associative array.
864 - [#49](https://github.com/zendframework/zend-diactoros/pull/49) provides several
865 fixes that ensure that Diactoros complies with the PSR-7 specification:
866 - `MessageInterface::getHeaderLine()` MUST return a string (that string CAN be
867 empty). Previously, Diactoros would return `null`.
868 - If no `Host` header is set, the `$preserveHost` flag MUST be ignored when
869 calling `withUri()` (previously, Diactoros would not set the `Host` header
870 if `$preserveHost` was `true`, but no `Host` header was present).
871 - The request method MUST be a string; it CAN be empty. Previously, Diactoros
873 - The request MUST return a `UriInterface` instance from `getUri()`; that
874 instance CAN be empty. Previously, Diactoros would return `null`; now it
875 lazy-instantiates an empty `Uri` instance on initialization.
876 - [ZF2015-05](http://framework.zend.com/security/advisory/ZF2015-05) was
877 addressed by altering `Uri::filterPath()` to prevent emitting a path prepended
878 with multiple slashes.
880 ## 1.0.3 - 2015-06-04
884 - [#48](https://github.com/zendframework/zend-diactoros/pull/48) drops the
885 minimum supported PHP version to 5.4, to allow an easier upgrade path for
886 Symfony 2.7 users, and potential Drupal 8 usage.
900 ## 1.0.2 - 2015-06-04
904 - [#27](https://github.com/zendframework/zend-diactoros/pull/27) adds phonetic
905 pronunciation of "Diactoros" to the README file.
906 - [#36](https://github.com/zendframework/zend-diactoros/pull/36) adds property
907 annotations to the class-level docblock of `Zend\Diactoros\RequestTrait` to
908 ensure properties inherited from the `MessageTrait` are inherited by
921 - [#41](https://github.com/zendframework/zend-diactoros/pull/41) fixes the
922 namespace for test files to begin with `ZendTest` instead of `Zend`.
923 - [#46](https://github.com/zendframework/zend-diactoros/pull/46) ensures that
924 the cookie and query params for the `ServerRequest` implementation are
925 initialized as arrays.
926 - [#47](https://github.com/zendframework/zend-diactoros/pull/47) modifies the
927 internal logic in `HeaderSecurity::isValid()` to use a regular expression
928 instead of character-by-character comparisons, improving performance.
930 ## 1.0.1 - 2015-05-26
934 - [#10](https://github.com/zendframework/zend-diactoros/pull/10) adds
935 `Zend\Diactoros\RelativeStream`, which will return stream contents relative to
936 a given offset (i.e., a subset of the stream). `AbstractSerializer` was
937 updated to create a `RelativeStream` when creating the body of a message,
938 which will prevent duplication of the stream in-memory.
939 - [#21](https://github.com/zendframework/zend-diactoros/pull/21) adds a
940 `.gitattributes` file that excludes directories and files not needed for
941 production; this will further minify the package for production use cases.
953 - [#9](https://github.com/zendframework/zend-diactoros/pull/9) ensures that
954 attributes are initialized to an empty array, ensuring that attempts to
955 retrieve single attributes when none are defined will not produce errors.
956 - [#14](https://github.com/zendframework/zend-diactoros/pull/14) updates
957 `Zend\Diactoros\Request` to use a `php://temp` stream by default instead of
958 `php://memory`, to ensure requests do not create an out-of-memory condition.
959 - [#15](https://github.com/zendframework/zend-diactoros/pull/15) updates
960 `Zend\Diactoros\Stream` to ensure that write operations trigger an exception
961 if the stream is not writeable. Additionally, it adds more robust logic for
962 determining if a stream is writeable.
964 ## 1.0.0 - 2015-05-21
966 First stable release, and first release as `zend-diactoros`.