Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#10163 closed defect (bug) (fixed)

HTTP request API error

Reported by: RickGC Owned by: 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: http://ws.audioscrobbler.com/1.0/user/Ryck/recenttracks.rss

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

Attachments (1)

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

Download all attachments as: .zip

Change History (11)

comment:1 @dd326 years ago

  • Status changed from new to accepted

See Also: #9761

@dd326 years ago

comment:2 @dd326 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.

comment:3 @RickGC6 years ago

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

comment:4 @ryan6 years ago

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

comment:5 @scribu6 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.

comment:6 @rovo896 years ago

Works fine for me with 2.8.1.

comment:7 @dd326 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? :)

comment:8 @rovo896 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.

comment:9 @dd326 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?

comment:10 @ryan6 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.