HttpRouter: Decode path parts before matching. #19

Merged
jordan merged 2 commits from lda/Cytoplasm:encode-http into master 2023-12-02 15:25:29 +00:00
Showing only changes of commit bca94c0309 - Show all commits

View file

@ -23,6 +23,7 @@
*/ */
#include <HttpRouter.h> #include <HttpRouter.h>
#include <Http.h>
#include <Memory.h> #include <Memory.h>
#include <HashMap.h> #include <HashMap.h>
#include <Str.h> #include <Str.h>
@ -266,7 +267,8 @@ HttpRouterRoute(HttpRouter * router, char *path, void *args, void **ret)
break; break;
} }
ArrayAdd(matches, substr); ArrayAdd(matches, HttpUrlDecode(substr));
Free(substr);
} }
} }
} }