$response->setStatusCode(304) add ":" to end of status header
$response = new \Phalcon\Http\Response();
$response->setStatusCode(304);
$response->sendHeaders();

Yea, i have this too.
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.
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
https://github.com/phalcon/cphalcon/issues/12179#issuecomment-243433799,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE9Ktr87fmV5mbnk3SrgyxQQXn9ubcq0ks5qlCxggaJpZM4JwWAt
.
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
Response object is set correctly, var_dump($this->response->getStatusCode());
string(24) "422 Unprocessable Entity"
I think what bug here: https://github.com/phalcon/cphalcon/blob/master/phalcon/http/response/headers.zep#L90
Fixed in 3.0.x branch
@dimak08 I just wanted to point out the same code line number :) You were faster :+1:
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.
When we can expect 3.0.2 to be released in order to fix this issue?
@andresgutierrez @sergeyklay
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.
@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
It's already fixed in 3.0.x