Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#10163 closed defect (bug) (fixed)

HTTP request API error

Reported by: rickgc's profile RickGC Owned by: dd32's profile dd32
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.8
Component: HTTP API Keywords: has-patch tested commit
Focuses: Cc:


When I try to use the function 'fech_rss' with a RSS2.0 feed I get this error:

Warning: gzinflate() [function.gzinflate]: data error in xxxxxx/wp-includes/http.php on line 1787

With other formats (RSS0.92, RSS1.0, Atom, etc) there is no problem

Sample feed to play:

Prior to WP2.8 there wasn't any error...

Attachments (1)

10163.diff (1.8 KB) - added by dd32 15 years ago.

Download all attachments as: .zip

Change History (11)

#1 @dd32
15 years ago

  • Status changed from new to accepted

See Also: #9761

15 years ago

#2 @dd32
15 years ago

  • Keywords has-patch needs-testing added; http gzinflate removed

attachment 10163.diff added

  • Introduces a compatible_gzinflate() function which attempts to decode most of the odd deflated string types which servers may return.
    • PHP's inbuilt function cannot handle many servers when they return data with different headers.
  • Works with the example link provided above, Not tested with any other servers.

#3 @RickGC
15 years ago

I tested the patch on my server and works like a charm! Thanks!

#4 @ryan
15 years ago

[11684]. Let's see how this does in trunk before bringing into the 2.8 branch.

#5 @scribu
15 years ago

  • Keywords tested commit added; needs-testing removed

Was getting this error while using the plugins_api().

Applied the patch on 2.8.1-beta2 and the warning dissapeared.

#6 @rovo89
15 years ago

Works fine for me with 2.8.1.

#7 @dd32
15 years ago

Works fine for me with 2.8.1.

Do you mean, That the patch works under 2.8.1 for you? Have you tested on many url's, or just not found one that fails? :)

#8 @rovo89
15 years ago

I applied the patch to my installation, which is 2.8.1 with a couple of plugins. Before the patch, I saw the same error message as the reporter when using the LastFM plugin. However, the decompression was successful, only the error messages were annoying. Suppressing these error messages by putting an @ before gzinflate worked as well, but this seems to be a better solution.

After applying the patch, I haven't seen any error messages nor malfunctions. The only problem I found occurs with curl and open_basedir enabled, then WP doesn't follow redirects. However, that's not related to this ticket.

#9 @dd32
15 years ago

I dont see this going into the 2.8 branch, And it seems to be fairing out pretty well in trunk, Shall we close as fixed for trunk?

#10 @ryan
15 years ago

  • Milestone changed from 2.8.5 to 2.9
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.