[Newbies] Fwd: Url & HttpUrl

Bob Courchaine bobc at nfldinet.com
Mon May 22 14:03:44 UTC 2006

[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 at orange.net>
Date:Mon, 22 May 2006 09:14:28 +0100
To:beginners-bounces at lists.squeakfoundation.org


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

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.


More information about the Beginners mailing list