diff options
author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-03-21 22:11:05 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2018-03-21 22:11:05 +0100 |
commit | 6d05f3e01a26fa416c9d0150163db20abac4b4ef (patch) | |
tree | b568a83a8759142bd580ee5bd59497092dc9c6f4 /tool | |
parent | bb0fbadacbd603b1e8d258f75ff5ca8ee481feb4 (diff) |
New upstream version 0.8.5upstream/0.8.5
Diffstat (limited to 'tool')
-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"); |