Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#7793 closed enhancement (fixed)

Transition all fsockopen, fopen, and curl to HTTP API

Reported by: jacobsantos's profile jacobsantos Owned by: jacobsantos's profile jacobsantos
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: Optimization Keywords: http has-patch commit
Focuses: Cc:

Description

Ticket is for transitioning the remaining functions over to the HTTP API. This does not include the dependencies on Snoopy, but it might in the future. It also does not include the SSL remote URL check, I'm not sure how to achieve that using the API (look for 200 maybe and check that URL was not redirected, maybe).

Supercedes #7224, #7676, and #7751.

Discussion on removing Snoopy can also begin. I'll start, basically since Magpie requires it, it might be best to leave it alone. The core of WordPress now doesn't use it (I'll confirm that), so it might not make sense refactoring an external library to use a WordPress one.

Attachments (3)

7793.r8984.diff (14.2 KB) - added by jacobsantos 16 years ago.
HTTP API transition based on r8984
7793.r9046.diff (2.3 KB) - added by jacobsantos 16 years ago.
Error checking for the HTTP API based off of r9046
7793.diff (854 bytes) - added by DD32 16 years ago.
download_url() from snoopy -> HTTP API (Attempt 2..)

Download all attachments as: .zip

Change History (20)

@jacobsantos
16 years ago

HTTP API transition based on r8984

#1 @jacobsantos
16 years ago

  • Keywords has-patch needs-testing added

Needs crazy amount of testing.

#2 @westi
16 years ago

(In [9011]) Move the link timestamp updater to the new HTTP api. See #7793 props jacobsantos.

#3 @westi
16 years ago

(In [9012]) Move the pingbacks and trackbacks to the new HTTP api. See #7793 props jacobsantos.

#4 @westi
16 years ago

(In [9013]) Move the old simple http method to use the new HTTP api. See #7793 props jacobsantos.

@jacobsantos
16 years ago

Error checking for the HTTP API based off of r9046

#5 @jacobsantos
16 years ago

  • Keywords commit added; needs-testing removed

#6 @ryan
16 years ago

(In [9051]) Error checking for HTTP requests. Props jacobsantos. see #7793

#7 @DD32
16 years ago

  • Version set to 2.7

attachment 7793.diff added.

converts download_url() from snoopy to the new HTTP API

@DD32
16 years ago

download_url() from snoopy -> HTTP API (Attempt 2..)

#8 @ryan
16 years ago

(In [9142]) Convert download_url() to http api. Props DD32. see #7793

#9 @ryan
16 years ago

download_url() now fails for me. It returns a 0 length file when downloading the nightly build. Get transport is curl. Post transport is streams.

#10 @ryan
16 years ago

Response is:

array(3) { ["headers"]=>  array(0) { } ["body"]=>  string(0) "" ["response"]=>  array(2) { ["code"]=>  int(200) ["message"]=>  string(2) "OK" } } 

#11 @DD32
16 years ago

sounds like you might have a problem with the curl transport, as its working for me with the HTTP Extension. I'll have a look at if i get a chance today

#12 @ryan
16 years ago

curl_error() says:

Operation timed out after 3000 milliseconds with 1350984 out of 1815410 bytes received

#13 @westi
16 years ago

3 seconds is the default timeout for the curl HTTP transport

#15 @ryan
16 years ago

(In [9186]) Give downloads a longer timeout. see #7793

#16 @jacobsantos
16 years ago

Should that be the rest of it? I'm not sure if you want to convert Magpie over to the HTTP API or not, but that should be the only one left. I didn't do a search for Snoopy, but I think I will for 2.8.

#17 @ryan
16 years ago

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

Let's call it done for 2.7.

Note: See TracTickets for help on using tickets.