Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

allow header field value of "0" #6907

Closed
wants to merge 8 commits into from
Closed

allow header field value of "0" #6907

wants to merge 8 commits into from

Conversation

figadore
Copy link
Contributor

'0' is a valid value for headers, such as content-length and custom headers

@Ocramius Ocramius added this to the 2.3.4 milestone Nov 21, 2014
@Ocramius Ocramius self-assigned this Nov 21, 2014
if ($value && strpos($key, 'HTTP_') === 0) {
if (strpos($key, 'HTTP_COOKIE') === 0) {
// Cookies are handled using the $_COOKIE superglobal
if ((is_array($value) && $value) || (strlen($value)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you allowing arrays if the issue is about the value 0? Allowing arrays seems to be the source of lots of Travis errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first commit failed because arrays are apparently a valid type for $value, but I guess I didn't quite fix it with this one

@figadore
Copy link
Contributor Author

Not sure how to figure out why Travis failed. I'd like to learn how to contribute properly, let me know what else I can do

@Ocramius
Copy link
Member

@shinymayhem I will restart the build: the travis setup was broken by me some days ago, sorry about that!

@Martin-P
Copy link
Contributor

@Ocramius Travis was working fine with this PR. When I posted my comment I saw normal results and failing testcases related to this issue on Travis. When I look now, I see Travis results are broken. Looks to me it is Travis itself that is broken and not the Travis setup?

@Ocramius
Copy link
Member

@Martin-P I fixed that in f4f0bf0 afaik (travis was stopping tests when CS checks failed, which is indeed a stupid thing).

@shinymayhem try with a rebase: should be clean (no conflicts), and travis should run correctly.

@figadore
Copy link
Contributor Author

@Ocramius did I do the rebase correctly?

@Ocramius
Copy link
Member

@shinymayhem I'll do the rebase myself, there is still a dangling commit.

Ocramius added a commit that referenced this pull request Nov 27, 2014
Ocramius added a commit that referenced this pull request Nov 27, 2014
@Ocramius Ocramius closed this in 3c45624 Nov 27, 2014
@Ocramius
Copy link
Member

Manually merged/tweaked, thanks @shinymayhem!

master: 3c45624
develop: a38a37f

gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
…ying loop logic, avoiding eager `is_array()` calls
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-http that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants