<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=HTTP_WebDAV_Client</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/14164" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13867" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13246" />
      <rdf:li rdf:resource="http://pear.php.net/bug/13245" />
      <rdf:li rdf:resource="http://pear.php.net/bug/12856" />
      <rdf:li rdf:resource="http://pear.php.net/bug/4225" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/14164">
      <title>HTTP_WebDAV_Client: Bug 14164 [Open] Content-range calculation is wrong.</title>
      <link>http://pear.php.net/bugs/14164</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Bug
Reported by kawai
2008-06-17T07:11:52+00:00
PHP: 5.2.6 OS: Irrelevant Package Version: CVS

Description:
------------
When writing a content, Content-range header is wrong in current implementation. The reason is much same with:
http://pear.php.net/bugs/bug.php?id=6407
http://pear.php.net/bugs/bug.php?id=12653</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Bug
Reported by kawai
2008-06-17T07:11:52+00:00
PHP: 5.2.6 OS: Irrelevant Package Version: CVS

Description:
------------
When writing a content, Content-range header is wrong in current implementation. The reason is much same with:
http://pear.php.net/bugs/bug.php?id=6407
http://pear.php.net/bugs/bug.php?id=12653</pre>]]></description>
      <dc:date>2008-06-17T07:11:52+00:00</dc:date>
      <dc:creator>hiroaki &amp;#x64;&amp;#111;&amp;#x74; kawai &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13867">
      <title>HTTP_WebDAV_Client: Feature/Change Request 13867 [Assigned] Property operation</title>
      <link>http://pear.php.net/bugs/13867</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by kawai
2008-05-10T03:05:05+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
I created an experimental package that support WebDAV property operation.
http://mp.i-revo.jp/user.php/kcvcrlkq/entry/307.html

I'm willing to donate the code to be integrated into current HTTP_WebDAV_Client code.

I'm also planning to create a library to support locking.</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by kawai
2008-05-10T03:05:05+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
I created an experimental package that support WebDAV property operation.
http://mp.i-revo.jp/user.php/kcvcrlkq/entry/307.html

I'm willing to donate the code to be integrated into current HTTP_WebDAV_Client code.

I'm also planning to create a library to support locking.</pre>]]></description>
      <dc:date>2009-01-01T09:35:35+00:00</dc:date>
      <dc:creator>hiroaki &amp;#x64;&amp;#111;&amp;#x74; kawai &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13246">
      <title>HTTP_WebDAV_Client: Feature/Change Request 13246 [Open] Caching of stat entries</title>
      <link>http://pear.php.net/bugs/13246</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by mbaierl
2008-02-28T09:53:26+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
Right now it is very slow to issue a HTTP request for each stat call - and the data is loaded in dir_opendir anyways, so it should be cached there as well.

Code should look something like this hack:

			$currenturl = &quot;&quot;;
			$buffer = &quot;&quot;;
			$GLOBALS['__webdavstat__'] = array();
            // for all returned resource entries
            foreach (split(&quot;\n&quot;, $req-&gt;getResponseBody()) as $line) {
                // get the href URL
                if (ereg(&quot;href&gt;([^&lt;]*)&quot;, $line, $matches)) {
                    // skip the directory itself
                    if ($matches[1] != $this-&gt;path) {
	                    // just remember the basenames to return them later with readdir()
	                    $this-&gt;dirfiles[] = basename($matches[1]);
                    }

					$currenturl = basename($matches[1]);
                }
				$buffer .= $line.&quot;\n&quot;;
				
				if( ereg(&quot;^&lt;D:response &quot;, $line, $matches)) {
					// start of response, ensure buffer is empty
					$buffer = $line.&quot;\n&quot;;
				}
				if( ereg(&quot;&lt;/D:response&gt;&quot;, $line, $matches)) {
					// we are done, parse it
					$propinfo = &amp;new HTTP_WebDAV_Client_parse_propfind_response2($buffer);
					$GLOBALS['__webdavstat__'][$path.$currenturl] = $propinfo-&gt;stat();
					unset($propinfo);
					
					$buffer = &quot;&quot;;
				}
            }

The HTTP_WebDAV_Client_parse_propfind_response2 class is a changed version of the existing HTTP_WebDAV_Client_parse_propfind_response class and the data is stored in a global variable until the next directory is read - this ensures PHP is not running out of memory for large scripts.</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by mbaierl
2008-02-28T09:53:26+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
Right now it is very slow to issue a HTTP request for each stat call - and the data is loaded in dir_opendir anyways, so it should be cached there as well.

Code should look something like this hack:

			$currenturl = &quot;&quot;;
			$buffer = &quot;&quot;;
			$GLOBALS['__webdavstat__'] = array();
            // for all returned resource entries
            foreach (split(&quot;\n&quot;, $req-&gt;getResponseBody()) as $line) {
                // get the href URL
                if (ereg(&quot;href&gt;([^&lt;]*)&quot;, $line, $matches)) {
                    // skip the directory itself
                    if ($matches[1] != $this-&gt;path) {
	                    // just remember the basenames to return them later with readdir()
	                    $this-&gt;dirfiles[] = basename($matches[1]);
                    }

					$currenturl = basename($matches[1]);
                }
				$buffer .= $line.&quot;\n&quot;;
				
				if( ereg(&quot;^&lt;D:response &quot;, $line, $matches)) {
					// start of response, ensure buffer is empty
					$buffer = $line.&quot;\n&quot;;
				}
				if( ereg(&quot;&lt;/D:response&gt;&quot;, $line, $matches)) {
					// we are done, parse it
					$propinfo = &amp;new HTTP_WebDAV_Client_parse_propfind_response2($buffer);
					$GLOBALS['__webdavstat__'][$path.$currenturl] = $propinfo-&gt;stat();
					unset($propinfo);
					
					$buffer = &quot;&quot;;
				}
            }

The HTTP_WebDAV_Client_parse_propfind_response2 class is a changed version of the existing HTTP_WebDAV_Client_parse_propfind_response class and the data is stored in a global variable until the next directory is read - this ensures PHP is not running out of memory for large scripts.</pre>]]></description>
      <dc:date>2008-06-19T01:51:47+00:00</dc:date>
      <dc:creator>mail &amp;#x61;&amp;#116; mbaierl &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/13245">
      <title>HTTP_WebDAV_Client: Feature/Change Request 13245 [Open] Uploading files is very slow</title>
      <link>http://pear.php.net/bugs/13245</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by mbaierl
2008-02-28T09:47:50+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
Because the standard blocksize of 8k is used and for each 8k block a new HTTP Request is issued uploading is very slow, especially for large files.

A smarter way is to collect the 8k packages and only transmit every i.e. 1MB.

Changes are needed for the following functions:
    function stream_write($buffer) 
    {
		$this-&gt;writebuffer .= $buffer;

        $start = $this-&gt;position;
        $end   = $this-&gt;position + strlen($buffer);

		$this-&gt;position += strlen($buffer);

		// should we send the buffer? &gt; 1M
		if(strlen($this-&gt;writebuffer) &gt;= WEBDAV_BUFFERSIZE)
			$this-&gt;stream_flush();
		
		return $end - $start;
}

	function stream_flush()
	{		
        // do some math
        $start = $this-&gt;writebufferposition;
        $end   = $this-&gt;writebufferposition + strlen($this-&gt;writebuffer);

		// create a partial PUT request
        $req = &amp;new HTTP_Request($this-&gt;url);
        $req-&gt;setMethod(HTTP_REQUEST_METHOD_PUT);
        if (is_string($this-&gt;user)) {
            $req-&gt;setAuthCredentials($this-&gt;user, @$this-&gt;pass);
            //$req-&gt;setBasicAuth($this-&gt;user, @$this-&gt;pass);          
        }
        $req-&gt;addHeader(&quot;Content-Range&quot;, &quot;bytes $start-$end/*&quot;);
        if ($this-&gt;locktoken) {
            $req-&gt;addHeader(&quot;If&quot;, &quot;(&lt;{$this-&gt;locktoken}&gt;)&quot;);
        }
        $req-&gt;addRawPostData($this-&gt;writebuffer);

        // go! go! go!
        $req-&gt;sendRequest();

        // check result
        switch ($req-&gt;getResponseCode()) {
        case 200:
        case 201:
        case 204:
            
			// clear the writebuffer and update the position
			$this-&gt;writebufferposition = $this-&gt;position;
			$this-&gt;writebuffer = &quot;&quot;;
			
            return true;
            
        default: 
            return false;
        }
	}


This works like a charm with 
define('WEBDAV_BUFFERSIZE', 			1048576, 	 true);</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Feature/Change Request
Reported by mbaierl
2008-02-28T09:47:50+00:00
PHP: Irrelevant OS:  Package Version: 1.0.0

Description:
------------
Because the standard blocksize of 8k is used and for each 8k block a new HTTP Request is issued uploading is very slow, especially for large files.

A smarter way is to collect the 8k packages and only transmit every i.e. 1MB.

Changes are needed for the following functions:
    function stream_write($buffer) 
    {
		$this-&gt;writebuffer .= $buffer;

        $start = $this-&gt;position;
        $end   = $this-&gt;position + strlen($buffer);

		$this-&gt;position += strlen($buffer);

		// should we send the buffer? &gt; 1M
		if(strlen($this-&gt;writebuffer) &gt;= WEBDAV_BUFFERSIZE)
			$this-&gt;stream_flush();
		
		return $end - $start;
}

	function stream_flush()
	{		
        // do some math
        $start = $this-&gt;writebufferposition;
        $end   = $this-&gt;writebufferposition + strlen($this-&gt;writebuffer);

		// create a partial PUT request
        $req = &amp;new HTTP_Request($this-&gt;url);
        $req-&gt;setMethod(HTTP_REQUEST_METHOD_PUT);
        if (is_string($this-&gt;user)) {
            $req-&gt;setAuthCredentials($this-&gt;user, @$this-&gt;pass);
            //$req-&gt;setBasicAuth($this-&gt;user, @$this-&gt;pass);          
        }
        $req-&gt;addHeader(&quot;Content-Range&quot;, &quot;bytes $start-$end/*&quot;);
        if ($this-&gt;locktoken) {
            $req-&gt;addHeader(&quot;If&quot;, &quot;(&lt;{$this-&gt;locktoken}&gt;)&quot;);
        }
        $req-&gt;addRawPostData($this-&gt;writebuffer);

        // go! go! go!
        $req-&gt;sendRequest();

        // check result
        switch ($req-&gt;getResponseCode()) {
        case 200:
        case 201:
        case 204:
            
			// clear the writebuffer and update the position
			$this-&gt;writebufferposition = $this-&gt;position;
			$this-&gt;writebuffer = &quot;&quot;;
			
            return true;
            
        default: 
            return false;
        }
	}


This works like a charm with 
define('WEBDAV_BUFFERSIZE', 			1048576, 	 true);</pre>]]></description>
      <dc:date>2008-06-19T01:54:20+00:00</dc:date>
      <dc:creator>mail &amp;#x61;&amp;#116; mbaierl &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/12856">
      <title>HTTP_WebDAV_Client: Bug 12856 [Open] Directories cannot be accessed without trailing slash</title>
      <link>http://pear.php.net/bugs/12856</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Bug
Reported by schmidt
2008-01-08T12:14:39+00:00
PHP: 5.2.0 OS:  Package Version: 1.0.0

Description:
------------
For regular files, the trailing slash in directory names is optional. E.g. is_dir('/tmp') and is_dir('/tmp/') are equivalent.

With HTTP_WebDAV_Client the trailing slash is required. E.g. if file_exists('webdav://exampel.com/foo/') returns true, then file_exists('webdav://exampel.com/foo') returns false.

For consistency with the filesystem, I think HTTP_WebDAV_Client should support both variants.

As a quick fix I have added the following the following to _check_options():

         $req-&gt;sendRequest();
+        if ($req-&gt;getResponseCode() == 301) {
+            $this-&gt;url .= '/';
+            return $this-&gt;_check_options();
+        }
         if ($req-&gt;getResponseCode() != 200) {
             return false;
         }</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Bug
Reported by schmidt
2008-01-08T12:14:39+00:00
PHP: 5.2.0 OS:  Package Version: 1.0.0

Description:
------------
For regular files, the trailing slash in directory names is optional. E.g. is_dir('/tmp') and is_dir('/tmp/') are equivalent.

With HTTP_WebDAV_Client the trailing slash is required. E.g. if file_exists('webdav://exampel.com/foo/') returns true, then file_exists('webdav://exampel.com/foo') returns false.

For consistency with the filesystem, I think HTTP_WebDAV_Client should support both variants.

As a quick fix I have added the following the following to _check_options():

         $req-&gt;sendRequest();
+        if ($req-&gt;getResponseCode() == 301) {
+            $this-&gt;url .= '/';
+            return $this-&gt;_check_options();
+        }
         if ($req-&gt;getResponseCode() != 200) {
             return false;
         }</pre>]]></description>
      <dc:date>2009-08-25T07:06:45+00:00</dc:date>
      <dc:creator>schmidt &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/4225">
      <title>HTTP_WebDAV_Client: Documentation Problem 4225 [Open] Documentation and test script request</title>
      <link>http://pear.php.net/bugs/4225</link>
      <content:encoded><![CDATA[<pre>HTTP_WebDAV_Client Documentation Problem
Reported by govereem@...
2005-04-26T08:54:24+00:00
PHP: 5.0.2 OS: windows xp Package Version: 

Description:
------------
Request

Expected result:
----------------
Could you create some test scripts, how to use this class and maybe create some documentation? Thank you.</pre>]]></content:encoded>
      <description><![CDATA[<pre>HTTP_WebDAV_Client Documentation Problem
Reported by govereem@...
2005-04-26T08:54:24+00:00
PHP: 5.0.2 OS: windows xp Package Version: 

Description:
------------
Request

Expected result:
----------------
Could you create some test scripts, how to use this class and maybe create some documentation? Thank you.</pre>]]></description>
      <dc:date>2008-04-24T19:14:39+00:00</dc:date>
      <dc:creator>govereem &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>HTTP_WebDAV_Client Documentation Problem</dc:subject>
    </item>
</rdf:RDF>
