You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing versions in the logs for statistics, determining the package version can be ambiguous if the package id ends in a number. For example, package id Frob.2 with version 1.0 would turn into https://<cdn host>/packages/frob.2.1.0.nupkg, making it ambiguous what the package id and version really are.
This will turn the download URL into https://<cdn host>/packages/frob.2.1.0.nupkg?packageVersion=1.0, removing the ambiguity.
Note that this isn't an issue for the v3 endpoints as the v3 download URLs have the version in the path already.
The text was updated successfully, but these errors were encountered:
Add the packageVersion to the query string of cdn redirect url's
Added a new constant `PackageVersionParameterName` to `CoreConstants.cs`.
Reorganized and added necessary `using` directives in multiple files.
Modified `CloudBlobFileStorageService` to include and handle the new `versionParameter` in its constructor and methods.
Refactored `GetRedirectUri` to include the `versionParameter` in the query string.
Added a helper method `ParseQueryString` in `CloudBlobFileStorageService`.
Updated `IFileStorageService` interface to include the `versionParameter`.
Updated `FileSystemFileStorageService` and `SymbolPackageFileService` to handle the `versionParameter`.
Updated `PackageFileService` to pass the `versionParameter`.
Updated and added tests in corresponding test files to verify the handling of the `versionParameter`.
The v2 endpoint for package downloads redirects incoming requests to the CDN storage:
https://www.nuget.org/api/v2/package/Newtonsoft.Json/13.0.3
->https://<cdn host>/packages/newtonsoft.json.13.0.3.nupkg
When parsing versions in the logs for statistics, determining the package version can be ambiguous if the package id ends in a number. For example, package id
Frob.2
with version1.0
would turn intohttps://<cdn host>/packages/frob.2.1.0.nupkg
, making it ambiguous what the package id and version really are.This will turn the download URL into
https://<cdn host>/packages/frob.2.1.0.nupkg?packageVersion=1.0
, removing the ambiguity.Note that this isn't an issue for the v3 endpoints as the v3 download URLs have the version in the path already.
The text was updated successfully, but these errors were encountered: