Home » HTTP » HTTP_WebDAV_Client » Bug #2463
stream_write() does not update position
Details
| Submitted | 2004-10-05 15:32 UTC |
|---|---|
| From | yangbin at fragnetics dot com |
| Assigned | hholzgra |
| Status | Closed |
| Package | HTTP_WebDAV_Client |
| PHP Version | 4.3.9 |
| OS | GNU/Linux |
| Roadmaps | (Not assigned) |
Comments
[2004-10-05 15:32 UTC] yangbin at fragnetics dot com
Description:
------------
Using:
PEAR package HTTP_WebDAV_Client
- v0.9.6
pear/HTTP_WebDAV_Client/Client/Stream.php
- patched to v1.5
Problem:
Successive calls to stream_write() (via e.g. puts()) always writes the data in the same position.
Reproduce code:
---------------
++++++++++++++++
reproduce code
++++++++++++++++
$file = fopen("webdav://someone:pass@webdav.somewhere.com/test", "w");
puts($file, "===================");
puts($file, "test");
+++++++++++++++++++++++++++
patch [in stream_write()]
+++++++++++++++++++++++++++
case 200:
case 201:
case 204:
$this->position += strlen($buffer); // add this line
return $end-$start;
Expected result:
----------------
in [$file]:
===================test
Actual result:
--------------
in [$file]:
test===============