Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
$client->request('GET', $nonExistantUrl) returns status 200 #67
I've just spent the last few hours trying to figure out why a url that should be 404'ing is returning 200. I assumed it was a problem with the cache, but after dd'ing the response, clearly it isn't. The response contains the normal 404 response text from symfony, but with a 200 status.
reproduce: use a panther client to make a request to a non-existing url, and see the status is 200, instead of 404.
After more research it will never be fixed because selenium mission statement is to reflect what the user will see, and they never see status codes.
This means that returning a status code is wrong. I understand it's necessary to be backwards compatible with web browser / gouette. However, returning a defacto 200 status code is inappropriate. Personally I'm not happy with trying to force Panther to have the same interface as the others - although they do a similar job, they have different use cases, so I see there are two solutions: