Make WordPress Core

Opened 5 years ago

Last modified 3 years 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 (2)

#1 @dd32
5 years 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.

#2 @SergeyBiryukov
3 years ago

#45327 was marked as a duplicate.

Note: See TracTickets for help on using tickets.