Simple URI analyser (wrapper to uriparser)

Timothy Rice 48f68cfcc8 Clean up for newer versions of uriparser library 3 lat temu
.gitignore 79c067d299 Ignore compiled binary 6 lat temu
LICENSE 060609c405 Initial commit 6 lat temu
Makefile 14419a7f73 Simplify makefile 3 lat temu
README.md 777aabfaa2 Explain purpose and provide an example. 6 lat temu
urine.c 48f68cfcc8 Clean up for newer versions of uriparser library 3 lat temu

README.md

urine

Simple URI analyser.

This is basically a thin wrapper to uriparser developed as a step towards writing a bittorrent engine that can understand magnet links.

Sample output (using example URI from https://stackoverflow.com/a/27927190):

$ urine 'magnet:?xt=urn:btih:0eb69459a28b08400c5f05bad3e63235b9853021&dn=Splinter.Cell.Blacklist-RELOADED&tr=udp%3A%2F%2Ftracker.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'
Error code: 0
Scheme:     magnet
User:       
Host:       
IPv4:       
IPv6:       
IPvFuture:  
Port:       
Path head:  
Path tail:  
Query:      
            xt=urn:btih:0eb69459a28b08400c5f05bad3e63235b9853021
            dn=Splinter.Cell.Blacklist-RELOADED
            tr=udp://tracker.com:80
            tr=udp://tracker.publicbt.com:80
            tr=udp://tracker.istole.it:6969
            tr=udp://tracker.ccc.de:80
            tr=udp://open.demonii.com:1337
Fragment:   
Abs Path:   False
Owner:      False