Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original Issue: slimphp/Slim-Http#61
Closes #11
The following components have been removed:
The following methods have been deprecated:
Headers Provisioning
It's important to note that the original headers that will hydrate the
Headers
object are obtained via thegetallheaders()
function's which is dependent on the underlying infrastructure of your project. See https://www.php.net/manual/en/function.getallheaders.php. If you want a consistent behavior you should override the original function within theSlim\Psr7
namespace. You can use any existing implementation you'd like e.g.: https://github.com/ralouphie/getallheadersThe following behavior has changed:
The method
Request::getHeaders()
used to return a reconstructed version of the original headers based on assumptions that were unsafe and did not preserve the original case. As the spec says:All the following methods are case-insensitive:
Request::getHeaders() behavior:
The method now returns the hyphenated original case as per RFC2616 without the
HTTP_
prefix.It's worth to mention that typically the
getallheaders()
function will provision headers in the following fashion as seen in ralouphie's implementation: