Ok, this is exactly what I did per your advice: procedure TForm1.HttpCli1MainLocationChange(Sender: TObject); var HttpCli: THttpCli; begin HttpCli := Sender as THttpCli; HttpCli.RcvdStream.Destroy; HttpCli.RcvdStream := TMemoryStream.Create; end;
Same problem still. Google.com still results in an invalid image (logo.gif). <-----Original Message-----> >From: Francois PIETTE [[email protected]] >Sent: 5/4/2009 1:42:50 PM >To: [email protected] >Subject: Re: [twsocket] webpage image source > >>I tried HttpCli1.RcvdStream := nil in OnLocationChange but the images >> are still invalid. > >This doesn't remove content from RcvdStream, it just disable access by the >component. You should instead clear the content (it depends on the type of >stream you are using. You may also destroy and recreate it). > >-- >[email protected] >The author of the freeware multi-tier middleware MidWare >The author of the freeware Internet Component Suite (ICS) >http://www.overbyte.be > > >----- Original Message ----- >From: "Xxxx Xxxx" <[email protected]> >To: <[email protected]> >Sent: Monday, May 04, 2009 7:56 PM >Subject: Re: [twsocket] webpage image source > > >>I tried HttpCli1.RcvdStream := nil in OnLocationChange but the images >> are still invalid. >> Any other ideas? >> >> >> <-----Original Message-----> >>>From: Francois PIETTE [[email protected]] >>>Sent: 5/3/2009 2:08:43 PM >>>To: [email protected] >>>Subject: Re: [twsocket] webpage image source >>> >>>Probably the datastream contains data from the not relocated URL as >> well as >>>the image from the relocated url. Use OnLocationChange to clear the >>>datastream. >>> >>>-- >>>[email protected] >>>The author of the freeware multi-tier middleware MidWare >>>The author of the freeware Internet Component Suite (ICS) >>>http://www.overbyte.be >>> >>>----- Original Message ----- >>>From: "Xxxx Xxxx" <[email protected]> >>>To: <[email protected]> >>>Sent: Sunday, May 03, 2009 8:37 PM >>>Subject: Re: [twsocket] webpage image source >>> >>> >>>> This is what I thought also, but I have FollowRelocation set to True >> and >>>> it still downloads these images as invalid - like in the >> 'firebug.gif' >>>> example. There is data there, but the image won't display. >>>> >>>> >>>> <-----Original Message-----> >>>>>From: Francois PIETTE [[email protected]] >>>>>Sent: 5/3/2009 8:45:14 AM >>>>>To: [email protected] >>>>>Subject: Re: [twsocket] webpage image source >>>>> >>>>>> One more question: when I try to retrieve some images using the >>>> appended >>>>>> "www.", the image does not download, but when I omit the >"www.", it >>>>>> downloads correctly. >>>>>> Try doing a GET request for >"notepad.com/images/firebug.gif" and it >>>>>> works. Try "www.notepad.com/images/firebug.gif" and it does >not. >>>>>> Either way will work in my web browser, but with HttpCli it >only >>>> works >>>>>> without "www." >>>>> >>>>>Actually it works if you allow HttpCli to follow relocation. >>>>>The real location for the image is without "www", but the server >do a >>>>>relocation if you prepend "www". Your browser automatically follow >>>>>relocation. >>>>> >>>>>Use HttpTst sample program to play with that url. >>>>> >>>>>> Is it possible to determine which format to use with HttpCli >> besides >>>>>> doing a HEAD every time? >>>>> >>>>>I don't understand what you mean. >>>>>HttpCli doesn't care about data format. It is just a HTTP transport >>>> layer, >>>>>whatever data is transported. >>>>> >>>>>-- >>>>>[email protected] >>>>>The author of the freeware multi-tier middleware MidWare >>>>>The author of the freeware Internet Component Suite (ICS) >>>>>http://www.overbyte.be >>>>> >>>>>-- >>>>>To unsubscribe or change your settings for TWSocket mailing list >>>>>please goto >http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >>>>>Visit our website at http://www.overbyte.be >>>>>. >>>>> >>>> >>>> >>>> <span id=m2wTl><p><font face="Arial, Helvetica, >sans-serif" >>>size="2" >>>> >>>style="font-size:13.5px">____________________________________________ __ >> _________________<BR>Get >>> >>>> the Free email that has everyone talking at <a >>>> href=http://www.mail2world.com >>>> target=new>http://www.mail2world.com</a><br> <font >>>> color=#999999>Unlimited Email Storage - POP3 - Calendar - >>>> SMS - Translator - Much More!</font></font></span> >>>> -- >>>> To unsubscribe or change your settings for TWSocket mailing list >>>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >>>> Visit our website at http://www.overbyte.be >>> >>>-- >>>To unsubscribe or change your settings for TWSocket mailing list >>>please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >>>Visit our website at http://www.overbyte.be >>>. >>> >> >> >> <span id=m2wTl><p><font face="Arial, Helvetica, sans-serif" >size="2" >> >style="font-size:13.5px">______________________________________________ _________________<BR>Get > >> the Free email that has everyone talking at <a >> href=http://www.mail2world.com >> target=new>http://www.mail2world.com</a><br> <font >> color=#999999>Unlimited Email Storage - POP3 - Calendar - >> SMS - Translator - Much More!</font></font></span> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be > >-- >To unsubscribe or change your settings for TWSocket mailing list >please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >Visit our website at http://www.overbyte.be >. > <span id=m2wTl><p><font face="Arial, Helvetica, sans-serif" size="2" style="font-size:13.5px">_______________________________________________________________<BR>Get the Free email that has everyone talking at <a href=http://www.mail2world.com target=new>http://www.mail2world.com</a><br> <font color=#999999>Unlimited Email Storage – POP3 – Calendar – SMS – Translator – Much More!</font></font></span> -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
