Closed toras9000 closed 1 month ago
Thanks for the proposal. I Agree that the v3 endpoints should be terminated with /
like the ones on nuget.org. Will get to it eventually, but I'd appreciate any PR amending the v3 endpoints as well, as I don't have much time currently.
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.
https://github.com/bagetter/BaGetter/blob/0e744432d73248ce6bc458459ba074a404ad7391/src/BaGetter.Web/BaGetterUrlGenerator.cs#L31 https://github.com/bagetter/BaGetter/blob/0e744432d73248ce6bc458459ba074a404ad7391/src/BaGetter.Web/BaGetterUrlGenerator.cs#L36
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.