forked from loic-sharma/BaGet
-
Notifications
You must be signed in to change notification settings - Fork 59
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
It may be better if the base URL ends in /. #153
Comments
Thanks for the proposal. I Agree that the v3 endpoints should be terminated with |
Regenhardt
added a commit
to Regenhardt/BaGetter
that referenced
this issue
Jan 2, 2025
Regenhardt
added a commit
to Regenhardt/BaGetter
that referenced
this issue
Jan 2, 2025
Regenhardt
added a commit
to Regenhardt/BaGetter
that referenced
this issue
Jan 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal
I think that it is better for service resource URLs included in the package's service index that are used as base URLs to end in /.
Specifically, it refers to the following.
BaGetter/src/BaGetter.Web/BaGetterUrlGenerator.cs
Line 31 in 0e74443
BaGetter/src/BaGetter.Web/BaGetterUrlGenerator.cs
Line 36 in 0e74443
Reasons for Proposal
It may depend on the application implementation, but if the base URL is not terminated with a /, it may result in a different URL than expected when combined with a relative URL.
For example, if you use the .NET Uri class as it is, the following differences will appear depending on the presence or absence of the trailing /.
I think something similar could happen outside of .NET Uri.
I believe that terminating the base URL with a / will reduce the likelihood of encountering such handling problems.
Note that the index
https://api.nuget.org/v3/index.json
on nuget.org also terminates the addresses ofPackageBaseAddress
andPackageBaseAddress
with a /.I can give one specific example of an application that encounters the above mentioned problem.
The following extension cannot display package information correctly when using the Bagetter v1.4.2 service index.
Based on my research into the operation of this application I have made the above suggestions.
https://marketplace.visualstudio.com/items?itemName=FullStackSpider.visual-nuget
etc.
I rely on translation tools. I'm sorry if there is a strange sentence.
The text was updated successfully, but these errors were encountered: