Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#45327 closed defect (bug) (duplicate)

Wrong content type returned for AJAX upload to async-upload.php

Reported by: dvershinin's profile dvershinin Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.9.8
Component: Upload Keywords:
Focuses: ui, administration Cc:

Description

When user uploads, e.g. featured image to post, the upload endpoint is /wp-admin/async-upload.php.
Both upload request and server response are in JSON format.

However, despite returning valid JSON data, the async-upload.php sends this header:

Content-Type: text/html; charset=UTF-8

Wherein it should be:

Content-Type: application/json; charset=UTF-8

Content type mismatch may be an issue to some server side security software...

Change History (1)

#1 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @dvershinin, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #40323.

Note: See TracTickets for help on using tickets.