GET calls validate path instead of pathname

path includes query parameters whereas pathname does not. The code as originally written will always fail when supplying query parameters as "/" != "/?doc={}".