Make WordPress Core

Opened 15 months ago

Last modified 15 months ago

#40323 new defect (bug)

wp-admin/async-upload.php returns "text/html" at Content-Type

Reported by: mrasu Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.3
Component: Upload Keywords: close 2nd-opinion
Focuses: administration Cc:


When uploading image via wp-admin/async-upload.php, response-header includes "text/html" at Content-Type.

I'm creating a module only for html. So I want to detect the response is html or not. But this response returns text/html at header, so I cannot detect correctly. To handle properly, I want response-header to use "application/json" or something.

Change History (1)

#1 @dd32
15 months ago

  • Component changed from REST API to Upload
  • Focuses rest-api removed
  • Keywords close 2nd-opinion added

If I recall correctly, wp-admin/async-upload.php is forced to return text/html due to browser incompatibilities.

Upon digging, it affects IE9 and lower - [31429].

I don't think we should be changing this header quite yet, maybe in another year or so we might be in a place where we can.

Note: See TracTickets for help on using tickets.