update "file:" URL handling in url.c #2110

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

phluid61 commented Nov 24, 2017

url: updates "file:" URI handling in url.c

  • LOTS of comment updates (especially about RFC 8089)
  • explicit error for SMB shares (e.g. file:////share/path/file) with test
  • more strict handling of authority (i.e. //hostname)
  • now accepts dodgy old C| drive letters
  • more precise handling of drive letters in and out of Windows
    (especially recognising both file:c:/ and file:/c:/)
  • new tests for file:path and file://127.0.0.1/path URLs

phluid61 added some commits Nov 24, 2017

update "file:" URL handling in url.c
* LOTS of comment updates
* explicit error for SMB shares (e.g. "file:////share/path/file")
* more strict handling of authority (i.e. "//localhost/")
* now accepts dodgy old "C:|" drive letters
* more precise handling of drive letters in and out of Windows
  (especially recognising both "file:c:/" and "file:/c:/")
shorten long lines
for `make checksrc`
Contributor

phluid61 commented Nov 24, 2017

TODO: write non-Windows unit tests to ensure that these all fail with CURLE_URL_MALFORMAT "File drive letters are only accepted in MSDOS/Windows.":

  • file:c:/
  • file:/c:/
  • file:///c:/
  • file:c|/
  • file:/c|/
  • file:///c|/

@bagder bagder added the URL label Nov 24, 2017

Owner

bagder commented Nov 24, 2017

Thanks!

@bagder bagder closed this in 2563461 Nov 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment