[wp-trac] [WordPress Trac] #45327: Wrong content type returned for AJAX upload to async-upload.php

WordPress Trac noreply at wordpress.org
Sat Nov 10 22:00:33 UTC 2018


#45327: Wrong content type returned for AJAX upload to async-upload.php
--------------------------------+-----------------------------
 Reporter:  dvershinin          |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Upload              |    Version:  4.9.8
 Severity:  minor               |   Keywords:
  Focuses:  ui, administration  |
--------------------------------+-----------------------------
 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...

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45327>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list