Fixes to bring this up to CGI/1.1 specification #112
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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