Such a failure usually indicates that the GET request is incorrect, which leads to a server code failure at its end. But, without seeing that the web browser requests really look for comparison with TIdHTTP requests, there is no way to know for sure what the server does not like.
Refresh . I see that when a web browser requests a URL, the server immediately sends a 200 response, however, when TIdHTTP requests a URL, the server sends a 301 redirect to the new URL, which then sends a 302 redirect to the error page when TIdHTTP requests this A URL that then sends a 500 response when TIdHTTP requests this URL.
The two differences between the web browser request and the initial TIdHTTP request, which will affect the web server, are:
The URL you request using TIdHTTP includes an anchor tag at the end (all after the # character - #pos=33_n_n_n_n_n_n&numberpage=2 ), which usually come out of a web browser. Anchors are not really part of the URLs. They are intended to be used by web browsers to find locations in data that is retrieved from a URL.
user agent. Some web servers are sensitive to different user agents and may send different responses to different types of user agents.
When I remove the binding from the URL, TIdHTTP.Get () no longer fails:
Memo1.Text := Get('http://www.laredoute.fr/vente-machine-a-coudre-bernette-20-kit-couture--garantie-2-ans.aspx?productid=401225048&documentid=999999&categoryid=22918417&customertarget=0&offertype=0&prodcolor=1');
source share