Make WordPress Core

Opened 15 years ago

Closed 15 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
Priority: normal Milestone: 3.3
Component: HTTP API Version:
Severity: normal Keywords:
Cc: Focuses:

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
15 years ago

  • Status newaccepted

#2 @dd32
15 years ago

  • Description modified (diff)

#3 @dd32
15 years ago

  • Keywords needs-patch removed
  • Milestone Future Release3.3

#4 @dd32
15 years ago

  • Resolutionfixed
  • Status acceptedclosed

In [19000]:

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

Note: See TracTickets for help on using tickets.