PDA

View Full Version : QHTTP Status code



whoops.slo
28th November 2006, 07:28
Hello!

While trying to connect to several URL's I receive various errors like 30X, 40X (other than 404, I know that one). Most of them mean somesort of Temporary of permanent redirection, proxy use,... How can I receive the new URL, so I can connect to it. For connection I use:
http->setHost(urlt.host(), urlt.port() != -1 ? urlt.port() : 80);
if (!urlt.userName().isEmpty())
http->setUser(urlt.userName(), urlt.password());
httpGetId = http->get(urlt.toString(), file);

Tnx, Luka

wysota
28th November 2006, 09:18
You should look in HTTP protocol specification (http://www.faqs.org/rfcs/rfc2616.html) to see what each code means and how to cope with it.