Replies: 2 comments 3 replies
-
I'm afraid your assumption is incorrect, the URL is not meant to be absolute. Mojolicious web apps are assumed to be deployed relative to a prefix for historic reasons going back to CGI. So you need to use |
Beta Was this translation helpful? Give feedback.
1 reply
-
To expand on what kraih said slightly (and because I didn't see his reply before trying it out 😄) the absolute parts of the url are contained within the url's base, and therefore you need to use to_abs. $ perl -Mojo -E 'say Mojo::Message::Request->new->parse(join "\r\n", "GET / HTTP/1.1", "Host: example.com", "", "")->url->to_abs'
http://example.com/ |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to reproduce the behavior
Expected behavior
$url2
should be absolute.Actual behavior
$url2
is not absolute.This leads to unexpected behaviour: when a serialised (
to_string
) request is parsed into a request and this request isstart
ed, it fails.See this StackOverflow question.
Beta Was this translation helpful? Give feedback.
All reactions