summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2018-07-09 12:18:10 +0200
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2018-07-09 12:18:10 +0200
commitf10130df30ed342e6064aa60d2a56f5107385d6b (patch)
tree202b9eac5bfd92ebfcb3b6402d68141032054eb0 /tool
parent12af0f6afae11029a608e33b98047aea4e82da7d (diff)
parent86fee0b29894235a4a9a5e64afe0a643841f500f (diff)
Merge branch 'release/debian/0.8.5-2'debian/0.8.5-2
Diffstat (limited to 'tool')
-rw-r--r--tool/uriparse.c11
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");