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

Lose trailing slash while create absolute url #975

Closed
avkhozov opened this issue Jun 22, 2016 · 1 comment
Closed

Lose trailing slash while create absolute url #975

avkhozov opened this issue Jun 22, 2016 · 1 comment

Comments

@avkhozov
Copy link
Contributor

  • Mojolicious version: 6.66
  • Perl version: 5.22.1
  • Operating system: Ubuntu 16.04 LTS

Steps to reproduce the behavior

$ perl -MMojo::URL -le '$u = Mojo::URL->new("http://x.com/a/"); $x = Mojo::URL->new("?page=1")->to_abs($u); print $x;'
http://x.com/a?page=1

Expected behavior

Expected url is http://x.com/a/?page=1

Actual behavior

to_abs drop trailing slash, but browsers leave trailing slash when address bar has trailng slash and href attr contains only query string.

@kraih kraih closed this as completed in 2c139a0 Jun 22, 2016
@kraih
Copy link
Member

kraih commented Jun 22, 2016

Thanks, should be fixed.

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

No branches or pull requests

2 participants