Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sent out a status text for unknown HTTP headers. #16588

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

dawehner
Copy link
Contributor

The fix is to sent out some status text, when we don't know a better text.

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@chx
Copy link
Contributor

chx commented Nov 18, 2015

@@ -454,7 +454,7 @@ public function setStatusCode($code, $text = null)
}

if (null === $text) {
$this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : '';
$this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : 'Unknown status text';
Copy link
Member

Choose a reason for hiding this comment

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

Unknow Status only (with caps)? text looks redondant

Copy link
Member

Choose a reason for hiding this comment

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

or maybe all lowercase to differenciate from regular status texts that are "ucwords"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So let's go with 'unknown status'?

@fabpot
Copy link
Member

fabpot commented Nov 19, 2015

Thank you @dawehner.

fabpot added a commit that referenced this pull request Nov 19, 2015
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16588).

Discussion
----------

Sent out a status text for unknown HTTP headers.

* The HTTP RFC explains that header('HTTP/1.1 418 ') should be fine, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1
* Apache itself though is broken, see https://gist.github.com/anonymous/a863d7b493c4b09733ec

The fix is to sent out some status text, when we don't know a better text.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

eec6fbc Sent out a status text for unknown HTTP headers.
@fabpot fabpot closed this Nov 19, 2015
@Tobion
Copy link
Contributor

Tobion commented Nov 19, 2015

Doesn't it say it's fixed in Apache?

This was referenced Nov 23, 2015
This was referenced Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants