# HG changeset patch # User aspinall # Date 1094164124 -7200 # Node ID fff9c761f89ebcd941734641a92223b602be65b1 # Parent e1582a0d29b5ecde30dde9e64c80e0f9a281d56f Fix file:/// and file://localhost/ to return local file result diff -r e1582a0d29b5 -r fff9c761f89e src/Pure/General/url.ML --- a/src/Pure/General/url.ML Fri Sep 03 00:26:18 2004 +0200 +++ b/src/Pure/General/url.ML Fri Sep 03 00:28:44 2004 +0200 @@ -55,15 +55,15 @@ fun gen_host quant = (quant (not_equal "/" andf Symbol.not_eof) >> implode) --| Scan.ahead ($$ "/" || Scan.one Symbol.is_eof); -val scan_host = gen_host Scan.any; val scan_host1 = gen_host Scan.any1; val scan_path = Scan.any Symbol.not_eof >> (Path.unpack o implode); val scan_url = Scan.unless (Scan.this_string "file:" || Scan.this_string "http:" || Scan.this_string "ftp:") scan_path >> File || - Scan.this_string "file://" |-- - (scan_host >> (fn "localhost" => "" | h => h)) -- scan_path >> RemoteFile || + Scan.this_string "file:///" |-- scan_path >> File || + Scan.this_string "file://localhost/" |-- scan_path >> File || + Scan.this_string "file://" |-- scan_host1 -- scan_path >> RemoteFile || Scan.this_string "http://" |-- scan_host1 -- scan_path >> Http || Scan.this_string "ftp://" |-- scan_host1 -- scan_path >> Ftp;