
inet control and "location:" headers
Hi all,
Can anyone help? I'm using the Inet control to download some web pages
from a site. This isn't the problem.
The problem is that sometimes these pages have "Location: " in their
header so the inet control (quite rightly) trundles off to that
location.
This is great, except that I am unable to find out where the control
has gone. For example:
http://www.*-*-*.com/
may have:
Location: http://www.*-*-*.com/
in its header. So the inet control goes off to www.bar.com. After
finishing, if you do:
debug.print inet1.URL
you get
http://www.*-*-*.com/
which, of course, isn't right because you're at the latter URL now.
If you also do:
inet1.getheader
you get the headers from www.bar.com. I've even tried requesting this
header in the state_changed event to look out for a "location:" line
and intercept it before inet goes off to that address, but you just
get an error message.
Does anyone have any suggestions?
Thanks
Rich