Skip to content

Conversation

@fruno-bulax
Copy link
Contributor

@fruno-bulax fruno-bulax commented Nov 30, 2025

While implementing hex mirrors for gleam, I couldn't figure out why https://hexpm.upyun.com worked but https://cdn.jsdelivr.net/hex did not.

Turns out if the base URL has a non-empty path without a trailing slash, requests aren't constructed quite right.

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!!

Could have have a unit test for this function for this case? 🙏

@fruno-bulax
Copy link
Contributor Author

Added a lil' test.

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lpil lpil merged commit f384134 into gleam-lang:main Dec 1, 2025
4 checks passed
@fruno-bulax fruno-bulax deleted the no-trailing-slash branch December 1, 2025 18:56
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

Successfully merging this pull request may close these issues.

2 participants