Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#16139 closed defect (bug) (wontfix)

Follow Refresh: Headers in Snoopy

Reported by: simsmaster's profile simsmaster Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 3.0.4
Component: External Libraries Keywords: needs-patch close
Focuses: Cc:


The Internet Information Server (IIS) sends back a "Refresh:0;URL" Header instead of the normal "Location:" Header.
In a plugin, I use Snoopy to fetch a page, and it does not follow a redirection via Refresh, witch brakes my plugin on IIS Servers.
I know Snoopy is deprecated, but I have some troubles with the HTTP API, so I prefer Snoopy.

Change History (6)

#1 @peaceablewhale
13 years ago

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

Should have been fixed in #10187

#2 @simsmaster
13 years ago

  • Cc info@… added
  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version set to 3.0.4

That duplicate is about the headers WP prints out. I´m talking about snoopy, while fetching a non-WP site. The bug is in Snoopy witch does not handle the redirection.

#3 @simsmaster
13 years ago

A quick fix:
Line 867 must be


and line 870 must be

preg_match("/^(Location:|URI:|Refresh:[ ]+[0-9]+;[ ]*url=)[ ]*(.*)/i",chop($currentHeader),$matches);

Both in wp-include/class-snoopy.php. I´m not really good at this regex stuff, but it works for me...

#4 @nacin
13 years ago

Simple fix: Don't use Snoopy. It's deprecated.

#5 @nacin
13 years ago

  • Keywords needs-patch close added; snoopy iis refresh removed
  • Priority changed from normal to lowest
  • Severity changed from normal to trivial

#6 @scribu
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.