summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2018-03-22 07:26:59 +0100
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2018-03-22 07:26:59 +0100
commit9da10f705434d2a18d1ac3670f16d9b10e77f10c (patch)
tree5fb118d3fa2a2193faf3758898ee7fe2b6abb549 /tool
parent12af0f6afae11029a608e33b98047aea4e82da7d (diff)
parent52052c161e3230d27658d819be68abd4597aa6eb (diff)
Merge branch 'feature/upstream' into develop
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");