diff options
author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-03-21 22:11:07 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-03-21 22:11:07 +0100 |
commit | c17b127df11ec779784c0b41e7e1500d041bd077 (patch) | |
tree | ec134b40f87f90bb6de54f3c2a15135cdb7f723b /tool/uriparse.c | |
parent | 0ca227c7ff3be80a64807df27ffe7066cf447e09 (diff) | |
parent | 6d05f3e01a26fa416c9d0150163db20abac4b4ef (diff) |
Update upstream source from tag 'upstream/0.8.5'
Update to upstream version '0.8.5'
with Debian dir e35894d616fcb570578d09c39828e967d4b6b4b0
Diffstat (limited to 'tool/uriparse.c')
-rw-r--r-- | tool/uriparse.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tool/uriparse.c b/tool/uriparse.c index c844ec6..e9c1218 100644 --- a/tool/uriparse.c +++ b/tool/uriparse.c @@ -36,6 +36,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <sys/socket.h> #include <stdio.h> #include <stdlib.h> #include <uriparser/Uri.h> @@ -110,7 +111,15 @@ int main(int argc, char *argv[]) { if (uri.fragment.first) { printf("fragment: %.*s\n", RANGE(uri.fragment)); } - printf("absolutePath: %s\n", (uri.absolutePath == URI_TRUE) ? "true" : "false"); + { + const char * const absolutePathLabel = "absolutePath: "; + printf("%s%s\n", absolutePathLabel, + (uri.absolutePath == URI_TRUE) ? "true" : "false"); + if (uri.hostText.first != NULL) { + printf("%*s%s\n", (int)strlen(absolutePathLabel), "", + "(always false for URIs with host)"); + } + } } printf("\n"); |