Comments (1)
I would suggest the following:
This would not only fix my issue, but also the issue given null as reason which a not supported status code, which leads to an interface implementation issue cause reasonPhrase should not return null as far as i unterstand the PSR7.
// If we got no body, defer initialization of the stream until Response::getBody()
if ('' !== $body && null !== $body) {
$this->stream = Stream::create($body);
}
$this->statusCode = $status;
$this->reasonPhrase = (string) $reason;
$this->setHeaders($headers);
if ('' === $this->reasonPhrase && isset(self::PHRASES[$this->statusCode])) {
$this->reasonPhrase = self::PHRASES[$this->statusCode];
}
$this->protocol = $version;
from psr7.
Related Issues (20)
- Broken PSR-7 immutability HOT 2
- argument name of withHeader() is inconsistent with PSR-7 definition. HOT 2
- feature request for a non-buffered stream (NonBufferedStream) HOT 3
- Empty body when using psr17factory's createRequest HOT 3
- Filter Uri->withUserInfo() input HOT 2
- Axios get request gives [AxiosError:Network Error] & Error: header name must be a non-empty string
- Response::__toString() HOT 2
- Integration tests errors HOT 2
- Escaping of user info breaks NTLM authentication HOT 9
- "Site not found" for https://tnyholm.se HOT 2
- psr/http-message 版本问题 HOT 4
- PSR/HTTP message incompatibility 2.0 on nyholm/psr7 server HOT 1
- Breaking change from 1.5.1 => 1.6.0 due to fseek on new streams? HOT 3
- https://packagist.org/packages/php-http/message-factory dependand package abandoned HOT 1
- Segmentation Error while using Elasticsearch php's library bulk method HOT 2
- php-http/message-factory HOT 2
- Empty host value not allowed HOT 1
- For what reason message trait contains original header names?
- Support for "Early Hints" / HTTP Code 103 HOT 1
- Request getSize() returns null for php://input stream HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psr7.