Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uri.get_path("file://...") - relative paths #39

Closed
oodgaard opened this issue Sep 12, 2015 · 2 comments
Closed

Uri.get_path("file://...") - relative paths #39

oodgaard opened this issue Sep 12, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@oodgaard
Copy link

This regex seems to not allow relative paths : https://github.com/Corvusoft/restbed/blob/master/source/corvusoft/restbed/uri.cpp#L207
(https://github.com/Corvusoft/restbed/blob/3.0/source/corvusoft/restbed/uri.cpp#L200)

e.g.:

auto uri = Uri("file://certs/server.key");
cout << uri.get_path() << endl;

prints: /server.key

I guess this is only relevant for file:// though since http://blah.com/blah would be fine.

@oodgaard oodgaard changed the title Uri get_path - relative paths Uri.get_path - relative paths Sep 12, 2015
@oodgaard oodgaard changed the title Uri.get_path - relative paths Uri.get_path() - relative paths Sep 12, 2015
@oodgaard oodgaard changed the title Uri.get_path() - relative paths Uri.get_path("file://...") - relative paths Sep 12, 2015
@ben-crowhurst
Copy link
Member

Thanks for that @oodgaard, will look to resolve this immediately.

@ben-crowhurst ben-crowhurst added this to the 3.5 milestone Sep 16, 2015
@ben-crowhurst ben-crowhurst self-assigned this Sep 23, 2015
@ben-crowhurst
Copy link
Member

See https://tools.ietf.org/html/rfc3986#section-4.2 for details of relative path URIs.

Relative Path Proposal

bool relative = true;
Uri uri("file://certs/server.key", relative );

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

No branches or pull requests

2 participants