I have a problem with getting data from a redirection page :
set url "<a url that point to a redirection page>"
set http [ http::geturl $url ]
putlog "[ http::code $http]"
set html [ http::data $http ]
set fs [open "test.txt" w+]
puts $fs $html
close $fs
i get in logs : HTTP/1.1 302 Found
so this should be a redireciton page , but
if i look at test.txt file , it's empty
I looked at man , and found this (in "http" command seciton):
http
The HTTP status reply from the server. This value is returned by the ::http::code command. The format of this value is:
HTTP/1.0 code string
The code is a three-digit number defined in the HTTP standard. A code of 200 is OK. Codes beginning with 4 or 5 indicate errors. Codes beginning with 3 are redirection errors. In this case the Location meta-data specifies a new URL that contains the requested information.
now , how can i show that location meta info ? maybe i can get the redirection url from there .
thx for the help