Skip to content

[HTTP] Fix Content-Disposition name property getters #114771

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

ManickaP
Copy link
Member

@Copilot Copilot AI review requested due to automatic review settings April 17, 2025 11:07
@ManickaP ManickaP requested a review from a team April 17, 2025 11:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/libraries/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs:351

  • Consider adding a guard for edge cases where nameParameter.Value may have a length less than 2 when quoted. This would help prevent potential runtime exceptions if an unexpected value is encountered.
return IsQuoted(nameParameter.Value) ? nameParameter.Value!.Substring(1, nameParameter.Value.Length - 2) : nameParameter.Value;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

response.Content.Headers.ContentDisposition.FileName contains quotes
3 participants