utils: add proper handling of "/" special case in uh_path_match()
authorJo-Philipp Wich <jo@mein.io>
Tue, 25 Oct 2016 14:23:05 +0000 (16:23 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 25 Oct 2016 14:32:50 +0000 (16:32 +0200)
commit1628fa4b34aa143187353f81e8001b9a15286bda
tree0f4cc4bab29f706d0f46e3cec46fc4d9429979f8
parent577c20c5f780a241d526b16345cf42ea81b675ab
utils: add proper handling of "/" special case in uh_path_match()

The special prefix of "/" should match any url by definition but the final
assertion which ensures that the matched prefix ends in '\0' or '/' is causing
matches against the "/" prefix to fail.

Add some extra code to handle this special case to implemented the expected
behaviour.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
utils.c