I am trying to feed an error through the HTTP status text (i.e. 500 ). When hosting off WebDev.WebServer.exe it seems to ignore when I set HttpContext.Response.Status beyond the status code. I poked around the code using Reflector and found this:
public override void SendStatus(int statusCode, string statusDescription)
{
this._responseStatus = statusCode;
}
I also found this:
private static string MakeResponseHeaders(int statusCode, string moreHeaders, int contentLength, bool keepAlive)
{
// ...
builder.Append(string.Concat(new object[] { "HTTP/1.1 ", statusCode, " ", HttpWorkerRequest.GetStatusDescription(statusCode), "\r\n" }));
// ...
}
It looks like it blatently ignores the statusDescription parameter. Has anyone found another way to get around WebDev's issues handling response status descriptions?