WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 7 months ago

#45327 closed defect (bug) (duplicate)

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

Reported by: 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
7 months 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.