Other in Networking Tools
Port to KIO.
You get the cookie jar for free.
KIO handles redirections by itself.
In fact, I don't know if the KIO policies may prevent this redirection from happening.
But we need to intercept the redirection() signal and kill the job (we're not reallyinterested in the target page's contents).