diff options
author | David Robillard <d@drobilla.net> | 2011-02-03 02:59:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-03 02:59:19 +0000 |
commit | 787af7fe07b00057b7d886e9fd508b259914997d (patch) | |
tree | 72cf3b70686b0e6d414234bcd5279f91bb245d43 | |
parent | cfdea96ce4c01e0aa0bae41e084110d03135f06a (diff) | |
download | serd-787af7fe07b00057b7d886e9fd508b259914997d.tar.gz serd-787af7fe07b00057b7d886e9fd508b259914997d.tar.bz2 serd-787af7fe07b00057b7d886e9fd508b259914997d.zip |
Write "//" for URIs with empty authorities (e.g. the correct file:///foo/bar instead of the incorrect file:/foo/bar, even though the authority has length zero).
git-svn-id: http://svn.drobilla.net/serd/trunk@89 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r-- | src/uri.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -258,7 +258,10 @@ serd_uri_serialise(const SerdURI* uri, SerdSink sink, void* stream) } WRITE_COMPONENT("", uri->scheme, ":"); - WRITE_COMPONENT("//", uri->authority, ""); + if (uri->authority.buf) { + WRITE("//", 2); + WRITE(uri->authority.buf, uri->authority.len); + } if (uri->path_base.len) { if (!uri->path.buf && (uri->fragment.buf || uri->query.buf)) { WRITE_COMPONENT("", uri->path_base, ""); |