From 787af7fe07b00057b7d886e9fd508b259914997d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 3 Feb 2011 02:59:19 +0000 Subject: 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 --- src/uri.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/uri.c b/src/uri.c index 997489ba..c7f345a4 100644 --- a/src/uri.c +++ b/src/uri.c @@ -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, ""); -- cgit v1.2.1