Customizing the HTTP Reason Phrase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux