[vs17.12] Merge tag v17.12.36#11864
Merged
surayya-MS merged 3 commits intodotnet:vs17.12from May 22, 2025
Merged
Conversation
…nse headers DownloadFile should not rely on the remote server response headers. Unless the DestinationFileName task parameter is specified - let's just fallback to the request URI - which is as well the publicly documented behavior ---- #### AI description (iteration 1) #### PR Classification Bug fix #### PR Summary This pull request updates the `DownloadFile` task to avoid relying on response headers for determining the file name, instead using the request URI. - Changes in `src/Tasks/DownloadFile.cs` to use `requestUri` instead of `response` for file name determination. - Modified method signature and logic in `TryGetFileName` to use `requestUri`. - Updated call to `TryGetFileName` to pass `uri` instead of `response`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
We're doing a version bump so all branches have up-to-date opt-prof runs. [OptProf data](https://dev.azure.com/devdiv/_apps/hub/ms-vscs-artifact.build-tasks.drop-hub-group-explorer-hub?name=OptimizationData/DotNet-msbuild-Trusted/vs17.12/20250414.8/11397433/1) ---- #### AI description (iteration 1) #### PR Classification Version bump. #### PR Summary This pull request updates the version number in the project configuration. - `eng/Versions.props`: Bumped `VersionPrefix` from `17.12.35` to `17.12.36`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR merges tag v17.12.36, bumps the version prefix, and refactors the file-name extraction in DownloadFile to take a URI instead of the full HTTP response.
- Changed
TryGetFileNameto accept aUriand updated its call site. - Removed fallback logic for
Content-Dispositionheader when determining file names. - Bumped
<VersionPrefix>to17.12.36ineng/Versions.props.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Tasks/DownloadFile.cs | Refactored TryGetFileName signature and logic; removed header-based filename fallback |
| eng/Versions.props | Updated <VersionPrefix> to 17.12.36 |
Comments suppressed due to low confidence (2)
src/Tasks/DownloadFile.cs:314
- [nitpick] Add unit tests for
TryGetFileNameto cover cases with a server-supplied Content-Disposition filename, user-specifiedDestinationFileName, and URI-only filenames.
private bool TryGetFileName(Uri requestUri, out string filename)
src/Tasks/DownloadFile.cs:326
- Removing the Content-Disposition fallback means server-provided filenames will no longer be used. Consider restoring
response.Content.Headers.ContentDisposition?.FileNamebefore falling back to the URI path.
: Path.GetFileName(requestUri.LocalPath);
rainersigwald
approved these changes
May 22, 2025
YuliiaKovalova
approved these changes
May 22, 2025
This was referenced Feb 4, 2026
Closed
This was referenced Feb 12, 2026
Closed
Merged
Closed
Closed
This was referenced Feb 22, 2026
Open
This was referenced Mar 2, 2026
This was referenced Mar 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Context
Changes Made
Testing
Notes