I just discovered a bug in tidhttp component. The scenario is this, im creating a small to fetch the pages of website using tidhttp get. I tried it in ebay all is ok, now after ebay i tried amazon thats where i encountered a problem. What happenned on my side is i searched for item "lenovo laptop" in amazon and copied the url of the second page and paste it in my small app, and whats happenning is it always gets the first page even if the url i used is the second page. Does anyone of you encountered this please see the source code i used in the link below. This source is defaulted to second page of amazon. Thanks you开发者_如何学Go guys in advance.
http://www.yourfilelink.com/get.php?fid=577209
What version of Indy are you using? your code works fine for me as-is when I try it with the current Indy 10.5.8 snapshot release.
If the server returns a success reply, TIdHTTP.Get() saves whatever data the server decodes to send. If you are not seeing the data you are expecting, chances are that Amazon is either redirecting TIdHTTP back to the first page when you try to access the second page directly, or it is sending the first page's data by accident. Either way, I seriously doubt this is a bug in TIdHTTP itself.
精彩评论