Setting response header text as well as status code in HandleSpecialURL

It’s pretty easy to set the status code for a WebRequest being handled in HandleSpecialURL…

Request.Status = 403 Request.Print("Delete isn't allowed.") return true

… but how do you alter the very first line of the response header text because at the moment it always just wraps the status code like this…

HTTP/1.1 403 OK

… whereas I would like it to be …

HTTP/1.1 403 Forbidden

I have no problem setting the response body and any other headers, that’s all exposed just fine, but that very first line in the response header always seems to end in “OK”.

Is there a way to change that “OK” to “Forbidden” or “Not Found” or whatever text would make more sense as status text to match the code?

You can’t right now. I only stumbled on that about a month ago. Please file a feature request.


After thinking about this, we’re most likely to set this value for you (based on the status code) so everyone gets the fix automatically.

That would be good.