zendframework / zend-http

Http component from Zend Framework
BSD 3-Clause "New" or "Revised" License
134 stars 85 forks source link

Avoid triggering a notice with special crafted accept headers #58

Closed theboolean closed 8 years ago

theboolean commented 8 years ago

Avoid triggering a notice when an accept header without an equal sign is parsed.

Refs #57

Freeaqingme commented 8 years ago

@theboolean Thanks for your Pull Request! Could you perhaps try to also include a test case as a unit test so we can be sure this bug won't resurface again, for example when someone refactors this class? Thanks!

theboolean commented 8 years ago

Hi @Freeaqingme, I added the test, and as you can see I rewrote the history of my branch putting it before my patch, so it is clear that the test failed before it. I also added another edge case test that passed also before applying my patch, just in case.

Freeaqingme commented 8 years ago

Awesome!

@weierophinney Given how all tests pass this looks good to me, but I've been out of it for a while. So perhaps this is something you could look at as well?

ezimuel commented 8 years ago

@theboolean Thanks for your contribution!

theboolean commented 8 years ago

@ezimuel you're welcome! If it looks good to you, you can also close the issue related to this PR (#57).