HttpRouter
: Decode path parts before matching. #19
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Telodendria/Cytoplasm#19
Loading…
Reference in a new issue
No description provided.
Delete branch "lda/Cytoplasm:encode-http"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Required by Telodendria/Telodendria#44.
@ -267,3 +268,3 @@
}
ArrayAdd(matches, substr);
ArrayAdd(matches, HttpUrlDecode(substr));
I think the decoding should happen before the matching. It would be confusing to match on an encoded path part but then have the decoded part be something totally different. So, we should decode the
pathPart
before feeding it intoregexec()
, match on that, and then take the appropriate substring from the decoded path part.Fixed!
Decode matches in HTTP router.toHttpRouter
: Decode path parts before matching.