diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-05-02 17:30:55 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-05-06 09:02:12 +0800 |
commit | a8f70e4bb930253065a0596a3b1f4d7894b074a9 (patch) | |
tree | 6f8e48412e9002f085405d176a489f49da96ece2 /lib/log/log.c | |
parent | 9af0c65fa5ba9ae8527a70dbf0e808d777dfb479 (diff) | |
download | talos-petitboot-a8f70e4bb930253065a0596a3b1f4d7894b074a9.tar.gz talos-petitboot-a8f70e4bb930253065a0596a3b1f4d7894b074a9.zip |
lib/url: fix no-scheme URL parsing
We were incorrectly dropping the first strlen("file://") characters from
URLs with no scheme:
--- test/urls/data/localpath.test 2013-05-02 17:26:48.826359036 +0800
+++ /tmp/tmp.gn4JsWLw5o 2013-05-02 17:26:50.262364613 +0800
@@ -2,6 +2,6 @@
scheme file
host (null)
port (null)
-path /test/path/to/local/file
-dir /test/path/to/local/
+path ath/to/local/file
+dir ath/to/local/
file file
This change fixes the issue by indicating "no scheme found" by a NULL
return from pb_url_find_scheme, and hadling it appropriately. We add a
testcase too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/log/log.c')
0 files changed, 0 insertions, 0 deletions