views:

54

answers:

1

Hi guys,

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 guys in advance.

http://www.yourfilelink.com/get.php?fid=577209

A: 

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.

Remy Lebeau - TeamB
hi remy, thanks for your reply,
im using indy 10.5.5, do you see the result of the get? is it second page in your side or first? because if on your side you get second page i will update my indy to 10.5.8. i dont think its being redirected because once you paste the url of second page to a browser it shows second page, but using idhttp get i see first page. the browser result and idhttp get should be the same right?
What is the URL of the "first page" you keep referring to? All I know right now is that when I have Get() retrieve the second page URL, the server returns a success with data. The search terms are filled in, so I assume it is indeed the second page content.
Remy Lebeau - TeamB
hi remy, i solved the bug. i discovered a new url to see the second page of amazon and this url is giving right content of the page. anyway, i appreciate your help... rock on dude /,/ thanks a lot :D