WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#12559 closed defect (bug) (fixed)

IXR Class strips newlines from posts

Reported by: apeatling Owned by: josephscott
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: XML-RPC Keywords: has-patch needs-testing
Focuses: Cc:

Description

Using the IXR class to fetch the latest posts using XML-RPC and 'metaWeblog.getRecentPosts', newlines are being completely stripped from the response.

This seems to be a bug in the parsing, where the response is broken down into 4096 byte chunks and stitched back together. The issue is with the trim() call on each chunk, stripping the line breaks.

Josephscott worked out a fix, and I have confirmed this to work, but I'm unsure if there are any adverse effects. Patch attached.

Attachments (1)

ixr.diff (478 bytes) - added by apeatling 11 years ago.

Download all attachments as: .zip

Change History (5)

@apeatling
11 years ago

#1 @nacin
11 years ago

  • Status changed from new to assigned

#2 @dd32
11 years ago

  • Keywords has-patch needs-testing added; xml-rpc ixr removed

Probably needs some testing.. But need to check it out to see if its caused by something else in the request process..

#3 @westi
10 years ago

This looks sane.

Only affects usage of IXR on outgoing requests not incoming requests.

That trim just looks bogus removing.

#4 @westi
10 years ago

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

(In [14677]) Don't trim whitespace from sections of the response in IXR_Client. Fixes #12559 props apeatling.

Note: See TracTickets for help on using tickets.