Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Those URL can't be recognized by parse_url_char #383

Closed
tianchao-haohan opened this issue Sep 2, 2017 · 5 comments
Closed

Those URL can't be recognized by parse_url_char #383

tianchao-haohan opened this issue Sep 2, 2017 · 5 comments

Comments

@tianchao-haohan
Copy link

Use the latest v2.7.1 as the http parser.

From the image below, those url contains escape character can't be parsed successfully.
empty_uri

@ploxiln
Copy link
Contributor

ploxiln commented Sep 4, 2017

non-ascii bytes cannot be in a URL path or query, they must be url-encoded
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

@tianchao-haohan
Copy link
Author

tianchao-haohan commented Sep 5, 2017

Is there workaround if there are some non-ascii bytes in url? for example, encode those non-ascii bytes before call http_parser_execute.

@tianchao-haohan
Copy link
Author

tianchao-haohan commented Sep 13, 2017

@ploxiln I think it is reasonable that support the utf-8 bytes in url. Especially in Restful, non-ascii could be used as the parameters in json and send the json by url. Could you please share me the idea how to support utf-8 in url parser?

@tianchao-haohan
Copy link
Author

Can somebody help me on this problem? Please give me some tips on how to do then enhancement.

@bnoordhuis
Copy link
Member

Compile http_parser in non-strict mode and it will accept bytes > 127 (and, by extension, UTF-8.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants