Make WordPress Core

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#10588 closed task (blessed) (fixed)

Use WP HTTP API in IXR_Client

Reported by: andy's profile andy Owned by: westi's profile westi
Milestone: 3.1 Priority: normal
Severity: normal Version: 2.8.3
Component: XML-RPC Keywords: XMLRPC, IXR, dev-feedback
Focuses: Cc:

Description

IXR_Client calls fsockopen directly. Thus blogs behind proxies can not connect to remote XMLRPC services. To take advantage of the proxy support added in [10692], IXR_Client should use wp_remote_post.

Attachments (2)

IXR-HTTP.diff (4.3 KB) - added by andy 15 years ago.
10588.diff (4.4 KB) - added by ryan 14 years ago.
Refreshed patch

Download all attachments as: .zip

Change History (16)

#1 @westi
15 years ago

  • Cc westi added
  • Milestone changed from 2.8.4 to 2.9
  • Version set to 2.8.3

+1

This sounds like a good idea.

#2 @andy
15 years ago

  • Owner changed from josephscott to andy
  • Status changed from new to accepted

#3 @josephscott
15 years ago

+1 as well, I like it. It should see if the wp_remote_post is available and use it as a preference, but fall back to the current behavior.

#4 @andy
15 years ago

josephscott, wp_remote_post is defined when http.php is included in wp-settings.php. The only user-installed code that could precede that is advanced-cache.php. I don't think it would be worth maintaining the fsockopen code just to ensure the availability of XMLRPC in advanced-cache.php.

#5 @josephscott
15 years ago

I asked to preserve the code for the sake of this being a 3rd party library and being able to merge changes back. If we make IXR require wp_remote_post then IXR it becomes useless as a 3rd party library. It wasn't a question of the wp_remote_post function being available to IXR at the point in the code execution.

This is something the WordPress has struggled with in many cases. Importing 3rd party libraries and then making hard/impossible to merge changes back. I'd rather not see that happen in this case.

@andy
15 years ago

#6 @jacobsantos
15 years ago

  • Type changed from defect (bug) to enhancement

Abstract the HTTP and send that back. If it is abstracted enough, you can replace the IXR HTTP with the WordPress HTTP like in SimplePie.

#7 @ryan
15 years ago

  • Milestone changed from 2.9 to Future Release

#8 @ryan
14 years ago

  • Milestone changed from Future Release to 3.1

@ryan
14 years ago

Refreshed patch

#9 @westi
14 years ago

  • Owner changed from andy to westi
  • Type changed from enhancement to task (blessed)

I'm going to ensure this makes it into 3.1 :-)

Thanks for the updated patch

#10 @jane
14 years ago

  • Keywords dev-feedback added

@westi: Want to check the last patch and make any edits necessary to get it in before 3.1 freeze?

#11 @westi
14 years ago

(In [16064]) Introduce WP_HTTP_IXR_Client. Extends IXR_Client and switches it to using the WordPress HTTP API instead of fsockopen. See #10588 props andy and ryan.

#12 @westi
14 years ago

(In [16065]) Switch to using WP_HTTP_IXR_Client in core. See #10588.

#13 @nacin
14 years ago

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

#14 @automattor
14 years ago

(In [16871]) Coding Standards clean-up, Variable typo fix ($errstr), Svn property correction. See #10588

Note: See TracTickets for help on using tickets.