Compare commits

..

No commits in common. "master" and "v2.0.1" have entirely different histories.

3 changed files with 14 additions and 26 deletions

View File

@ -1,4 +1,4 @@
snoopy
======
hello!
fork http://sourceforge.net/projects/snoopy/

View File

@ -1,8 +1,7 @@
{
"name": "basemaster/snoopy",
"description": "snoopy",
"license": "GPL-2.0-or-later",
"version": "2.0.2",
"license": "GPLv2",
"authors": [
{
"name": "Clientbase"

View File

@ -195,8 +195,7 @@ class Snoopy
$frameurls = $this->_frameurls;
$this->_frameurls = [];
//while (list(, $frameurl) = each($frameurls))
foreach ($frameurls as $frameurl)
while (list(, $frameurl) = each($frameurls))
{
if ($this->_framedepth < $this->maxframes)
{
@ -328,8 +327,7 @@ class Snoopy
$frameurls = $this->_frameurls;
$this->_frameurls = [];
//while (list(, $frameurl) = each($frameurls))
foreach ($frameurls as $frameurl)
while (list(, $frameurl) = each($frameurls))
{
if ($this->_framedepth < $this->maxframes)
{
@ -605,8 +603,7 @@ class Snoopy
// catenate the non-empty matches from the conditional subpattern
//while (list($key, $val) = each($links[2]))
foreach ($links[2] as $key => $val)
while (list($key, $val) = each($links[2]))
{
if (!empty($val))
{
@ -614,8 +611,7 @@ class Snoopy
}
}
//while (list($key, $val) = each($links[3]))
foreach ($links[3] as $key => $val)
while (list($key, $val) = each($links[3]))
{
if (!empty($val))
{
@ -837,8 +833,7 @@ class Snoopy
{
$this->rawheaders = (array) $this->rawheaders;
}
//while (list($headerKey, $headerVal) = each($this->rawheaders))
foreach ($this->rawheaders as $headerKey => $headerVal)
while (list($headerKey, $headerVal) = each($this->rawheaders))
{
$headers .= $headerKey . ": " . $headerVal . "\r\n";
}
@ -1170,13 +1165,11 @@ class Snoopy
{
case "application/x-www-form-urlencoded":
reset($formvars);
//while (list($key, $val) = each($formvars))
foreach ($formvars as $key => $val)
while (list($key, $val) = each($formvars))
{
if (is_array($val) || is_object($val))
{
//while (list($cur_key, $cur_val) = each($val))
foreach ($val as $cur_key => $cur_val)
while (list($cur_key, $cur_val) = each($val))
{
$postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&";
}
@ -1192,13 +1185,11 @@ class Snoopy
$this->_mime_boundary = "Snoopy" . md5(uniqid(microtime()));
reset($formvars);
//while (list($key, $val) = each($formvars))
foreach ($formvars as $key => $val)
while (list($key, $val) = each($formvars))
{
if (is_array($val) || is_object($val))
{
//while (list($cur_key, $cur_val) = each($val))
foreach ($val as $cur_key => $cur_val)
while (list($cur_key, $cur_val) = each($val))
{
$postdata .= "--" . $this->_mime_boundary . "\r\n";
$postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n";
@ -1214,12 +1205,10 @@ class Snoopy
}
reset($formfiles);
//while (list($field_name, $file_names) = each($formfiles))
foreach ($formfiles as $field_name => $file_name)
while (list($field_name, $file_names) = each($formfiles))
{
settype($file_names, "array");
//while (list(, $file_name) = each($file_names))
foreach ($file_names as $file_name)
while (list(, $file_name) = each($file_names))
{
if (!is_readable($file_name))
{