On Mon, 24 Feb 2014 17:30:23 GMT, Dicebot wrote:
On Mon, 24 Feb 2014 17:44:30 +0100, Sönke Ludwig wrote:
If I ever considered using vibe.d for perfomance-critical project, I'd likely just fork it and provide status codes based rendering alternative. But that is not a solution you are loking for :)
You can just set
HTTPServerResponse.statusCode
instead of throwing aHTTPStatusException
, no need to fork anything. And as said, I intend
to avoid the exception for the 404 status case, too.Ah, I didn't know that. Will it also trigger custom error page handler properly?
No, a missing body would mean that a 404 is sent. But I guess we could make an exception and call the error handler with the existing status code for !res.headerWritten && res.satusCode >= 400
. Does that sound sane?