For what it’s worth, I ran into this myself during my recent experimentation with the webserver, and I was similarly surprised. Even seeing something like “200 Okay” struck me as different, since most servers seem to use the “200 OK” spelling. I’d always been curious about how those strings were specified, so I looked into the standard and found they were not, in fact, mandated to be anything in particular.
Of course, I think the spelling of “Okay” is up for debate, but I agree that “500 Okay” is a little odd. I considered trying to fix it myself, as I’d guess it’s likely just an oversight somewhere, but since I replaced the error handler in “production” I figured it wasn’t worth immediately fixing, anyway. That said, I would absolutely consider a server returning a status like “500 Okay” to be a bug that should be fixed, even if it’s okay by the spec in the strictest interpretation. It would be nice if the webserver used a lookup table for the status string when the code is provided but the response phrase is not. There seem to be a fairly well agreed-upon set of phrases used for each status code, and I don’t see any reason to avoid following the principle of least astonishment here. > On Jan 23, 2016, at 14:34, Matthew Butterick <m...@mbtype.com> wrote: > >> If you think (A) is the problem, then I think there's a >> misunderstanding of HTTP responses. The Reason-Phrase is not mandated >> to be anything in particular by the protocol---the client is not >> required to even look at it and it can be replaced with anything. >> http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html > > This is true in a strict technical-compliance sense. But the protocol also > says "the Reason-Phrase is intended for the human user," suggesting that it > should convey to a human what the code does to a machine. For error 500, it > recommends "Internal Server Error". Without this least-astonishment > principle, we could also look forward to creative stylings like "Error 404: > File Found", "Error 401: Completely Authorized", and "Error 502: Hey, What's > That Behind You?!?!" > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.