[This message was incorrectly sent to the bounces address. I'm forwarding it to the list on behalf of Zulq. -Bob]
Subject:Url & HttpUrl From:Zulq Alam zulq@orange.net Date:Mon, 22 May 2006 09:14:28 +0100 To:beginners-bounces@lists.squeakfoundation.org
Hi,
I originally posted this to the squeak-dev list but that's just habit. This is list seems more appropriate. I need to process some URLs in a batch with no prior knowledge of whether these URLs will require authentication.
Firstly, if I use Url's #retrieveContents for a URL that requires authentication I am prompted for user name and password interactively. I would rather an error was signaled or nil returned.
Having looked at the code there doesn't seem to be any way of changing this behaviour without either modifying the code (used elsewhere) or creating a new subclass which I would then have to instantiate directly instead of using Url's #absoluteFromText which I'd rather not do since I may not just be dealing with HTTP.
Secondly, if I do dismiss this prompt either by choosing No or Cancel when asked whether I want to enter a user name or password a MIMEDocument is returned which has its contents set to the to the full 401 Unauthorized response including the headers prefixed by "error occured retrieving url <THEURL>: " (done by HttpUrl>>normalizeContent).
This looks like two bugs, cancel not actually cancelling the request and the actual response not being parsed correctly.
Thanks, Zulq
beginners@lists.squeakfoundation.org