corrected path matching logic to really check the http method type