Skip to content
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

Headers::send() added ":" to modified Status header. #12179

Closed
dimak08 opened this issue Aug 30, 2016 · 13 comments
Closed

Headers::send() added ":" to modified Status header. #12179

dimak08 opened this issue Aug 30, 2016 · 13 comments
Assignees
Labels
bug A bug report status: low Low
Milestone

Comments

@dimak08
Copy link

dimak08 commented Aug 30, 2016

$response->setStatusCode(304) add ":" to end of status header

$response = new \Phalcon\Http\Response();
$response->setStatusCode(304);
$response->sendHeaders();

2016-08-30 12 46 25

Details

  • Phalcon version: 3.0.0
  • PHP Version: 7.0.10
@Jurigag
Copy link
Contributor

Jurigag commented Aug 30, 2016

Yea, i have this too.

@sergeyklay sergeyklay self-assigned this Aug 30, 2016
@sergeyklay sergeyklay added this to the 3.0.2 milestone Aug 30, 2016
@stamster
Copy link
Contributor

This is only case with 304 HTTP status? I'm heavily using setStatusCode() method, and never had such issue with 4xx, 5xx or 3xx status codes.

@dimak08
Copy link
Author

dimak08 commented Aug 30, 2016

With all statuses except 200

30 авг. 2016 г. 16:13 пользователь "stamster" [email protected]
написал:

This is only case with 304 HTTP status? I'm heavily using setStatusCode()
method, and never had such issue with 4xx, 5xx or 3xx status codes.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12179 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE9Ktr87fmV5mbnk3SrgyxQQXn9ubcq0ks5qlCxggaJpZM4JwWAt
.

@stamster
Copy link
Contributor

You're correct.

HTTP/1.1 404 Not Found:
Server: nginx
Date: Tue, 30 Aug 2016 13:20:05 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 160
Connection: keep-alive

This is stupid bug. xD

@stamster
Copy link
Contributor

Response object is set correctly, var_dump($this->response->getStatusCode());

string(24) "422 Unprocessable Entity"

@dimak08
Copy link
Author

dimak08 commented Aug 30, 2016

I think what bug here: https://github.com/phalcon/cphalcon/blob/master/phalcon/http/response/headers.zep#L90

phalcon pushed a commit that referenced this issue Aug 30, 2016
@andresgutierrez
Copy link
Contributor

Fixed in 3.0.x branch

@stamster
Copy link
Contributor

@dimak08 I just wanted to point out the same code line number :) You were faster 👍

But, really if you look at code this does not look as a bug as someone obviously put effort to make sure : will be present on each http status message?! I wonder why.

@stamster
Copy link
Contributor

When we can expect 3.0.2 to be released in order to fix this issue?
@andresgutierrez @sergeyklay

@sergeyklay
Copy link
Contributor

@stamster https://github.com/phalcon/cphalcon/milestone/22

@stamster
Copy link
Contributor

stamster commented Sep 27, 2016

It would be nice if we could have quick fix for this issue, since it may block some ancient environments (Java 1.6 xD) which refuse to work if they don't find <CR><LF> after HTTP status response.

@sergeyklay
Copy link
Contributor

@stamster
Could you please check 3.0.x branch?

git clone [email protected]:phalcon/cphalcon.git
cd cphalcon
git checkout 3.0.x

zephir fullclean
zephir build

@Jurigag
Copy link
Contributor

Jurigag commented Sep 27, 2016

It's already fixed in 3.0.x

@niden niden added bug A bug report status: low Low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

6 participants