Fix query path matcher

I made a blunder mistake when forgot to check for '?'

The fix should be as followed:
```c
if (*path == 0 && (*q == 0 || *q == '?'))
```