During investigation of #101, I found several fairly major discrepancies between Wagi and the CGI/1.1 specification. This fixes the following:
SCRIPT_NAME is now correctly the path too the handler route (route minus /...)
PATH_INFO is now correctly the path added after the handler route (e.g. whatever matched /...)
PATH_TRANSLATED is now correctly the URL-decoded value of PATH_INFO
The Status parser now allows there to be a message in addition to the code (e.g. Status 404 Not Found). However, the message is ignored, and the standard messages are used.
Additionally:
X_RELATIVE_PATH has been removed, replaced by PATH_INFO
While the spec does not allow for a Status without a Content-Type, I easily discovered cases in the wild where a CGI returned Status, and neither a body nor a Content-Type. We now allow this (which makes sense).
During investigation of #101, I found several fairly major discrepancies between Wagi and the CGI/1.1 specification. This fixes the following:
SCRIPT_NAME
is now correctly the path too the handler route (route minus/...
)PATH_INFO
is now correctly the path added after the handler route (e.g. whatever matched/...
)PATH_TRANSLATED
is now correctly the URL-decoded value ofPATH_INFO
Status
parser now allows there to be a message in addition to the code (e.g.Status 404 Not Found
). However, the message is ignored, and the standard messages are used.Additionally:
X_RELATIVE_PATH
has been removed, replaced byPATH_INFO
Status
without aContent-Type
, I easily discovered cases in the wild where a CGI returnedStatus
, and neither a body nor aContent-Type
. We now allow this (which makes sense).Docs were updated accordingly
Closes #101
Signed-off-by: Matt Butcher matt.butcher@microsoft.com