Fixed call to wrong function for finding end of HTTP path