Opened 14 years ago
Closed 14 years ago
#16139 closed defect (bug) (wontfix)
Follow Refresh: Headers in Snoopy
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | trivial | Version: | 3.0.4 |
Component: | External Libraries | Keywords: | needs-patch close |
Focuses: | Cc: |
Description
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)
#2
@
14 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
@
14 years ago
A quick fix:
Line 867 must be
if(preg_match("/^(Location:|URI:|Refresh:)/i",$currentHeader))
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...
Note: See
TracTickets for help on using
tickets.
Should have been fixed in #10187