Skip to content

Removed Content Type header for 304 response since no content is being returned#8557

Merged
pranavkm merged 3 commits intodotnet:masterfrom
ChiragRupani:feature/8230removecontenttype304
Mar 20, 2019
Merged

Removed Content Type header for 304 response since no content is being returned#8557
pranavkm merged 3 commits intodotnet:masterfrom
ChiragRupani:feature/8230removecontenttype304

Conversation

@ChiragRupani
Copy link
Copy Markdown
Contributor

Summary of the changes

  • Removes Content Type header when preconditional headers process to 304 (NotModified)

Addresses #8230

@Eilon Eilon added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 15, 2019
@pranavkm
Copy link
Copy Markdown
Contributor

@ChiragRupani could you make the changes I suggested here: #8557 (comment)? I'd also recommend rebasing on master. We had some build infrastructure issues that are addressed in more recent commits.

@pranavkm pranavkm self-assigned this Mar 19, 2019
@ChiragRupani ChiragRupani marked this pull request as ready for review March 20, 2019 03:07
if (preconditionState == PreconditionState.NotModified)
{
response.StatusCode = StatusCodes.Status304NotModified;
response.StatusCode = StatusCodes.Status304NotModified;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you undo this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed spaces

{
// Assuming the request is not a range request, and the response body is not empty, the Content-Length header is set to
// the length of the entire file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Undo please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed spaces

@pranavkm
Copy link
Copy Markdown
Contributor

Thanks for the PR!

@ChiragRupani ChiragRupani deleted the feature/8230removecontenttype304 branch March 21, 2019 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants