Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Resolves warning raised when version is not matched. #4893

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

elyobo commented Jul 28, 2013

No description provided.

Member

Ocramius commented Jul 28, 2013

Could you please provide a failing test for this one?

elyobo commented Jul 28, 2013

No problem. The following shows the problem; the version match is optional in the regex, so the check on line 96 may be undefined if the string doesn't contain a matching HTTP version. No idea whether that happens in practice, but you might as well handle it gracefully.

public function testRequestsWithoutHttpVersionAreOK()
{
        $requestString = "GET http://www.domain.com/index.php";
        $request = Zend\Http\Request::fromString($requestString);
}

weierophinney added a commit that referenced this pull request Aug 19, 2013

Merge pull request #4893 from elyobo/fix-http-request-warning
Resolves warning raised when version is not matched.

weierophinney added a commit that referenced this pull request Aug 19, 2013

weierophinney added a commit that referenced this pull request Aug 19, 2013

@ghost ghost assigned weierophinney Aug 19, 2013

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#4893 from elyobo/fix-h…
…ttp-request-warning

Resolves warning raised when version is not matched.

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment