FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Requests to URL's without trailing slash getting timed out #347

Closed elbojoloco closed 3 years ago

elbojoloco commented 6 years ago

Hello, I am experiencing a really weird issue that I can't properly work around. When I send a GET request to a URL without a trailing slash, the request times out in most cases (even when the url works just fine, when I paste it into chrome). Now in some cases the trailing slash is NOT required, for example URL's that end with a file extension like .html, .php or .asp and so forth. There are also cases (like wikipedia), where a trailing slash generates a 404, removing the trailing slash still works, but the URL without the trailing slash will get timed out. So as you can already notice, it is nearly impossible to work around this issue, and I wonder where in it lies that trailing slashes are required for sending get requests?

Is this an issue with the package, or maybe PHP itself?