0

We're stumped. We're getting a new header in our Apache httpd + Passenger web server we didn't expect. We have a sensitive web client reading this we cannot modify at this time.

Can we modify this piece of the header? As we understand it, the "OK" is part of the spec. We would like to modify the header so that it includes all the expected pieces of the spec.

We are expecting:

"HTTP/1.1 200 OK"

But instead are getting:

"HTTP/1.1 200 "
comb
  • 143
  • 1
  • 6
  • 1
    That shouldn't happen.. is the application running in passenger directly manipulating the response object to set the status code? – Shane Madden May 07 '13 at 19:19
  • We've isolated it to one of a number of updates/patches to the OS and apache httpd. I'll post further once we determine the cause of the issue. – comb May 07 '13 at 19:33
  • This was helpful: https://groups.google.com/forum/?fromgroups=#!topic/phusion-passenger/sseC6jTQ1lI – comb May 07 '13 at 19:42

1 Answers1

3

You're not meant to interpret anything beyond the numeric response code in your computer program; the textual representation is meant for human consumption.

See RFC 2616 section 6.1.1:

6.1.1 Status Code and Reason Phrase

The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. These codes are fully defined in section 10. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase.

Looking for "OK" (or indeed, anything beyond the number) is a logic error in the program. The ABNF grammar makes clear that the Reason-Phrase may be empty:

      Reason-Phrase  = *<TEXT, excluding CR, LF>

So, your server is operating according to spec; the client is not.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • This is really addressing the larger issue. In many business relationships, the parties are expected to adhere to relevant standards, of which RFC 2616 is one. If you have such an agreement, you can use this noncompliance to pressure the other party into fixing their client. – Michael Hampton May 07 '13 at 20:17