Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Site requiring authorization

From: gscottjones:mchsi at: 13-Jun-2002 7:30

> From: "Charles" > > Greetings folks. I try downloading a file through > > HTTP from REBOL/Core. > > Thing is, I get a 401 auth required error. How can > > I get around this? When I grab the file with IE, it > > pops up a dialog box asking for user and password. > > In my case, the user is the email address. For instance: > > user: [me--site--dom] > > pwd: fubar > > file: > > > > So I want to write/binary %somedir/data.bin > > read/binary file .. but get 401. > > Any info folks? Thanks!
From: "Brett Handley"
<snip> > Have a look at > > You will probably need to use the READ [...] format, specifying username
> password > (see the FTP) example.
Hi, Charles (and Brett), The method that Brett refers to avoids the need to parse the user/pass/url request: read [ scheme: 'FTP host: "" port-id: 8000 target: %/file.txt user: "bill" pass: "vbs" ] The problem is that the current url parse rule does not recognize the "@" symbol as part of a valid user name. An alternative to Brett's suggestion is to patch the character set by adding "@" as being valid (watch for line wrap). net-utils/url-parser/user-char: union net-utils/url-parser/user-char make bitset! #"@" With this patch you (hopefully) would be able to do something like: write/binary read http://[me--site--dom]:[fubar--www--site--dom]/file.bin %somedir/data.bin There is some additional explanation Again, either method can work, depending on your preference. Regards, --Scott Jones