Open yohgaki opened 8 years ago
Hello Yasuo,
Thank you for your comment.
You are right, there is no support for relative (including schemaless) URLs. It is a simple project just for learning re2c and use it in Ruby C extensions. I am not sure if I will be able to add this support soon, but I am thinking about it.
I have another similar project which is using Ragel for parsing URLs and it should have better support for RFC3986:
https://github.com/staskobzar/uri_scanner
It produces Ruby code but can be easily changed to produce C code.
As I said, both projects were created in learning purposes and I am not using them in any production projects. So I can not guarantee they are 100% working.
I have added MIT license, so feel free to take and use it.
Have a good day!
Thank you for the reply. MIT license is great!! I'll look into the URI scanner also!
I'm looking for URL/URI parser implemented by re2c. Nice work! What is the license of this code? MIT/BSD is preferred :)
It seems schemaless URL, e.g. '//example.com/path/to/file', is not supported yet. It's used often with HTTP/HTTPS mixed sites. Will this be supported? http://greenbytes.de/tech/webdav/rfc3986.html#reference-resolution
It seems it does not support PATH only URL also. This is supported by HTTP Location header. http://greenbytes.de/tech/webdav/rfc7231.html#header.location
http://greenbytes.de/tech/webdav/rfc3986.html#components
So, section 3.3 defines 5 different ABNF http://greenbytes.de/tech/webdav/rfc3986.html#path
If all of these are supported, it would be great!!