修复 hv_parse_url 处理 '#' 和 '?' 顺序优先级 bug#719
Closed
House-Men wants to merge 1 commit into
Closed
Conversation
Owner
|
根据 RFC 3986 标准定义,URI 的通用语法结构为: scheme:[//authority]path[?query][#fragment] (方括号表示可选,但顺序不可调换) |
Contributor
Author
标准格式顺序确实是这样,但是#字符的出现代表后面可以是任意剩余字符,其中就可以出现?,而且代码 http/HttpMessage.cpp 中对 HttpRequest::Path() 的处理也是有?与#做了优先级处理的,经过主流浏览器地址栏与开发者工具观察请求报文也是可以证实确实存在优先级处理,#如果比?优先出现那么后面都属于fragment而不会识别成path=/xxx/xxx.htm#xxx,query=xxxx,fragment=空 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
解决类似“/xxx/xxx.htm#xxx?xxxx”的顺序导致解析结果有错误。