|
Hi,
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 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>: ". This looks like two bugs, cancel not
actually cancelling the request and the actual response not being parsed
correctly.
I'm currently look for what's prepending the text to the MIMEDocument
contents but would appeciate some advice on the first point since the
second is not really an issue for me.
Thanks,
Zulq
|