WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#18982 closed defect (bug) (fixed)

Content-Type is ignored when passed as part of the header for WP_Http

Reported by: PeteMall Owned by: dd32
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords:
Focuses: Cc:

Description (last modified by dd32)

If the body argument is offered up to WP_HTTP in the form of an Array or Object, It'll overwrite any Content-Type headers which were specifically set.

We should respect all the headers which Developers pass to WP_HTTP (A notable exception would be the Content-Length header when an object/array is passed).

Change History (4)

#1 @dd32
7 years ago

  • Status changed from new to accepted

#2 @dd32
7 years ago

  • Description modified (diff)

#3 @dd32
7 years ago

  • Keywords needs-patch removed
  • Milestone changed from Future Release to 3.3

#4 @dd32
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In [19000]:

Respect the Content-Type header developers pass to WP_HTTP. Fixes #18982

Note: See TracTickets for help on using tickets.