| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-users Mailing List Archives
file:// command line parsing
From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Tue, 5 Mar 2002 17:48:03 -0500
When compiling "things" under cygwin, it's possible to have an executable (such as less.exe) that will recognize posix paths (e.g. /home/kevin/tmp.txt) and windows paths (e.g. C:\cygwin\home\kevin\tmp.txt) somewhat interchangably. In addition, they can properly follow the shell symantics, with regard to backslashes. In other words, when refering to a windows path under bash, I have to double up the back-slashes (e.g. C:\\cygwin\\home...), while under the cmd.exe windows command shell, this is not necessary.
I tried this under curl 7.9.5 pre6 (probably similar under previous versions), and I see the following:
from cygwin's bash prompt:
$ curl file:///c/temp/test.txt works ok (posix path)
$ curl file://c:\\temp\\test.txt NOT ok (escaped dos path)
$ curl file://c:\\\\temp\\\\test.txt works ok (double-escaped dos path)
$ curl 'file://c:\temp\test.txt' NOT ok (quoted dos path)
$ curl 'file://c:\\temp\\test.txt' works ok (quoted AND escaped dos path)
from dos prompt:
> curl file:///c/temp/test.txt works fine (posix path)
> curl file://c:\temp\test.txt fails, but would have
> curl file://c:\\temp\\test.txt works fine (extra quotes)
> curl file://c:/temp/test.txt (not really a valid path
It appears that somewhere inside its command line parsing, curl.exe is losing a set of back-slashes. Wondering whether this is needed (doesn't a typical unix shell do this before passing along to the application?). Will the fix likely be a cygwin-specific patch, or can it somehow be a more general purpose patch?
If it needs to be cygwin specific, I'll make an attempt at it, if I can figure out where to look. Any pointers would be appreciated.
--Kevin
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info