Edit report at https://bugs.php.net/bug.php?id=46035&edit=1

 ID:                 46035
 Comment by:         josh at joshbutts dot com
 Reported by:        ms419 at freezone dot co dot uk
 Summary:            fopen() fails to open successful HTTP 207
                     Multi-Status response
 Status:             Closed
 Type:               Bug
 Package:            Streams related
 PHP Version:        5.2.6
 Block user comment: N
 Private report:     N

 New Comment:

This does not appear to be fixed in 5.3.6 compiled from source on Mac OS 10.7


Previous Comments:
------------------------------------------------------------------------
[2008-10-18 18:15:14] fel...@php.net

This bug has been fixed in PHP 5.3.

------------------------------------------------------------------------
[2008-09-17 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2008-09-10 00:58:44] il...@php.net

Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.3-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.3-win32-installer-latest.msi

Seems to work just fine here...

------------------------------------------------------------------------
[2008-09-09 23:35:40] ms419 at freezone dot co dot uk

Description:
------------
I am working on a PHP interface to WebDAV repositories using fopen(). I use 
fopen() to make a PROPFIND request to the server, hoping to use DOM to parse 
the result. Unfortunately fopen() fails even on successful responses from the 
server

Reproduce code:
---------------
<?php

$filename = 'http://qubit-toolkit.googlecode.com/svn/trunk/';
$context = stream_context_create(array('http' => array(
  'method' => 'PROPFIND',
  'header' => 'Depth: 1')));
$handle = fopen($filename, 'r', false, $context);
var_dump($handle);


Expected result:
----------------
$handle should be a resource from which I can read the server's successful 
response:

PROPFIND /svn/trunk/ HTTP/1.0

Host: qubit-toolkit.googlecode.com
Depth: 1


HTTP/1.0 207 Multi-Status
Date: Tue, 09 Sep 2008 23:34:32 GMT
Server: Apache
Content-Type: text/xml; charset="utf-8"
Connection: Close

<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response xmlns:S="http://subversion.tigris.org/xmlns/svn/"; xmlns:C="http://su
bversion.tigris.org/xmlns/custom/" xmlns:V="http://subversion.tigris.org/xmlns/d
av/" xmlns:lp1="DAV:" xmlns:lp3="http://subversion.tigris.org/xmlns/dav/"; xmlns:
lp2="http://apache.org/dav/props/";>
<D:href>/svn/trunk/</D:href>
[...]

Actual result:
--------------
ket% php fopen.php 

Warning: fopen(http://qubit-toolkit.googlecode.com/svn/trunk/): failed to open 
stream: HTTP request failed! HTTP/1.0 207 Multi-Status
 in /home/jablko/public_html/fopen.php on line 7
bool(false)
ket% 



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=46035&edit=1

Reply via email to