Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Undefined offset: 1 when parse garbage HTTP header #29

Open
vmanyushin opened this issue Dec 21, 2017 · 1 comment
Open

Undefined offset: 1 when parse garbage HTTP header #29

vmanyushin opened this issue Dec 21, 2017 · 1 comment

Comments

@vmanyushin
Copy link

vmanyushin commented Dec 21, 2017

When HTTP header is not valid, this line

Http/Http.php

Line 139 in 6d3e114

list($name, $value) = explode(':', $header, 2);
produce Undefined offset: 1

Can you add something like this

if(stripos($header, ':')) {
    list($name, $value)                = explode(':', $header, 2);
    $this->_headers[strtolower($name)] = trim($value);
}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Hywan
Copy link
Member

Hywan commented Dec 27, 2017

Thanks for the reporting!

Are you in the mood of creating a PR? If no, maybe some @hoaproject/hoackers can take this one :-)?

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

No branches or pull requests

2 participants