in reply to resolving URLs in downloaded pages
I don't know whether it covers both your issues, but a test can't hurt.