[xdebug-dev] Bug 0000266: DBGp: Windows filename URIs use incorrect path separators

From: <noreply[@]lists.xdebug.org>
Date: Thu, 31 May 2007 22:26:24 +0200

The following bug has been CLOSED
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000266
======================================================================
Reporter: toddw
Handler:
======================================================================
Project: Xdebug
Bug ID: 266
Category: Debug client (console)
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Operating System: Windows XP
PHP Version: 5.1.6
Xdebug Version: 2.0.0rc3
======================================================================
Date Submitted: 2007-05-11 01:24 CEST
Last Modified: 2007-05-31 22:26 CEST
======================================================================
Summary: DBGp: Windows filename URIs use incorrect path separators
Description:
In the dbgp protocol, the filename URI set in response to the "stack_get"
command are incorrect. Example:

<?xml version="1.0" encoding="iso-8859-1"?>
<response command="stack_get" transaction_id="36">
  <stack where="{main}" level="0" type="file"
filename="file:///C%3A%5CApache2.2%5Chtdocs%5Cphp%5Cphpinfo.php"
lineno="4"></stack>
</response>

That filename unescaped is:
file:///C:\Apache2.2\htdocs\php\phpinfo.php

I believe it should be using forward slashes for the path separator, like
so:
file:///C:/Apache2.2/htdocs/php/phpinfo.php

======================================================================

----------------------------------------------------------------------
 toddw - 2007-05-11 01:41 CEST
----------------------------------------------------------------------
Actually I'm now not sure if it should be:
  file:///C:/Apache2.2/htdocs/php/phpinfo.php
or
  file:///C:|/Apache2.2/htdocs/php/phpinfo.php

According to the stack_get documentation at
http://xdebug.org/docs-dbgp.php#id50 it should be of the form:
  file://systemname/c|/path

But that seems just wrong. Surely if this is a URI/URL then it would be of
the form:
  file://systemname/c/path

The different, three slashes represents and local absolute path "///",
whilst two slashes "//" represents a path on a specific machine.

----------------------------------------------------------------------
 toddw - 2007-05-11 01:52 CEST
----------------------------------------------------------------------
Woops, I misread that format, it does actually seem correct (either of).
  file:///C:/Apache2.2/htdocs/php/phpinfo.php
or
  file:///C|/Apache2.2/htdocs/php/phpinfo.php

So, with the machine name it would be either of:
  file://systemname/C:/Apache2.2/htdocs/php/phpinfo.php
or
  file://systemname/C|/Apache2.2/htdocs/php/phpinfo.php

----------------------------------------------------------------------
 toddw - 2007-05-11 02:01 CEST
----------------------------------------------------------------------
After reading:
http://www.ietf.org/rfc/rfc1738.txt
and
http://www.ietf.org/rfc/rfc2396.txt

I would say it should be:
file://systemname/C:/Apache2.2/htdocs/php/phpinfo.php

----------------------------------------------------------------------
 derick - 2007-05-31 22:26 CEST
----------------------------------------------------------------------
Fixed in CVS, but I omitted the system name:

fileuri="file:///I:/bug266.php"

Bug History
Date Modified Username Field Change
======================================================================
2007-05-11 01:24toddw New Bug
2007-05-11 01:24toddw Bug Monitored: toddw
2007-05-11 01:41toddw Bugnote Added: 0000608
2007-05-11 01:52toddw Bugnote Added: 0000609
2007-05-11 02:01toddw Bugnote Added: 0000610
2007-05-31 22:26derick Bugnote Added: 0000645
2007-05-31 22:26derick Status new => closed
======================================================================
Received on Thu May 31 2007 - 22:26:30 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST