How do I customize the HTTP Reason Phrase ?

Definition: The Reason Phrase is sent in an HTTP response on the very
first line immediately following the status code, for example such
line may look like this:

   HTTP/1.1 401 Unauthorized

In this case "Unauthorized" is the Reason Phrase.

I've tried the Send-as-is Handler [1] which according to its
documentation should be able to do this. For example, I have an .asis
file which looks like this:

----file content begin
Status: 401 Blablabla
Content-type: text/html

<html>
<head>
<title>Foo Bar Title</title>
</head>
<body>
<h1>You can't do that</h1>
</body>
</html>
----file content end

This .asis file gets picked up and used in the response but it doesn't
really change the status code. I've looked into the source code for
the as-is module and can see no evidence that the documentation is
correct in stating that the header named "Status" will actually be
used for anything. As long as the .asis file can be successfully read
then the status code will be 200. That doesn't match the
documentation.

In any case maybe there's another way to customize Reason Phrase?

Thanks.

/Lars

[1] https://httpd.apache.org/docs/2.4/mod/mod_asis.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to