You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: The HTTP status code definitions are missing some well-know/standard values
Description:
Testing the request_handle:respond Lua function with various status codes, I find that the status text for the following codes is set to "Unknown" instead of the correct value:
102: "Processing", # see RFC 2518
103: "Early Hints", # see RFC 8297
306: "Switch Proxy", # Switch Proxy (now unused)
418: "I'm a teapot", # see RFC 2324 (now unused)
425: "Too Early", # see RFC 8470
449: "Retry With", # proprietary MS extension
451: "Unavailable For Legal Reasons"
With the other status codes, like 200 or 301, the correct status text is return in the response ("OK" or "Moved Permanently", respectively). With the status codes listed above, the status text is "Unknown" instead of the IANA/industry values.
Searching the source code, it appears that these codes are just missing from the various HTTP status definitions.
All of these, with the possible exceptions of deprecated/non-standard 306, 418, and 449, should be added to the various lists of HTTP status codes in the Envoy source.
with the known status codes. Aside from 500-504, which appear to be caught as other errors, all of the Werkzeug/IANA values provide the correct status text except for those lists above, which say "Unknown"
Or just grep as shown above to check for the texts of these codes.
As a potential work-around, I tried using a string of "status_code status_text" in request_handle:response but that doesn't work and, instead, responds with 404 Not Found.
The text was updated successfully, but these errors were encountered:
@daixiang0 Indeed, my grep did find that one instance (see the end of my write-up), but that is insufficient for general use of all of the IANA/Industry-standard values.
Title: The HTTP status code definitions are missing some well-know/standard values
Description:
With the other status codes, like 200 or 301, the correct status text is return in the response ("OK" or "Moved Permanently", respectively). With the status codes listed above, the status text is "Unknown" instead of the IANA/industry values.
Searching the source code, it appears that these codes are just missing from the various HTTP status definitions.
All of these, with the possible exceptions of deprecated/non-standard 306, 418, and 449, should be added to the various lists of HTTP status codes in the Envoy source.
Sources:
Source code locations
vs.
Repro steps:
with the known status codes. Aside from 500-504, which appear to be caught as other errors, all of the Werkzeug/IANA values provide the correct status text except for those lists above, which say "Unknown"
Or just grep as shown above to check for the texts of these codes.
As a potential work-around, I tried using a string of "status_code status_text" in
request_handle:response
but that doesn't work and, instead, responds with 404 Not Found.The text was updated successfully, but these errors were encountered: