Porter,

I've experienced a similar problem on my system and this is what I found
out.

1) The web server was setup to recognize the ".r" extension as associated
with the REBOL executable.

2) When I referenced the URL, the Server replied with access denied, because
the "Script" privilege was not turned on for the directory that the REBOL
file resided in.  That is, the web server (PWS) was attempting to execute
the REBOL script, but was denied because of the security imposed by the web
server on the directory that the REBOL script resided in.
3) Had the "Script" privilege been turned on, the server would have executed
the REBOL file instead of downloading it to the web client.

3) I just changed the extension on the file to ".txt" and did a "do
http://my.url.com/foo.txt" and it worked as advertised.

Hope this works for you.

-- Michael Cornelio
   "Those who like software, sausage, the law, and children
     probably shouldn't watch them being made."

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 25, 2000 8:42 AM
Subject: [REBOL] HTTP username/password


> Ok -
>
> so I'll write it again - as this is driving me up the wall.  The User
> guide even has an "example" saying you should be able to do this...  But,
> it still doesn't work.
>
> REBOL [
>     Title: "Password Page Retreival"
>     Date:  25-Jan-2000
>     Purpose: "A script to fetch a web page that uses basic authentication"
>     File:  %getsecurepage.r
>     Notes: {
> A quick test of the scheme mechanism of reading a URL -
> this should allow for retrieval of web pages that are
> located behind a password protected challenge.
>     }
> ]
>
> http_file: make url! "http://webuser:[EMAIL PROTECTED]/mysite/"
>
> print http_file
>
> print read http_file
>
>
> I'm on Windows NT - and I have IIS running.  mysite is a protected
> directory, which the username of "webuser", and the password of
> "letmein" grants access.  If I copy and paste that URL into a new
> web-browser (i.e. it doesn't have the username and password cached),
> whether it's IE, or NS - it works - brings up the page and everything.
>
> Yet -  here's what REBOL produces:
>
> >> do %getsecurepage.r
> Script: "Secure Page Retreival" (25-Jan-2000)
> http://webuser:[EMAIL PROTECTED]/mysite/
> connecting to: 127.0.0.1
> ** User Error: Error.  Target url: http://127.0.0.1/mysite/ could not be
> retrieved.  Server response: HTTP/1.1 401 Access Denied.
> ** Where: print read http_file
>
> As you can see I print the URL - just to be sure it's not dropping the
> username and password for some reason.  Yet on the attempt to read that
> URL, you can see that it seemingly drops the user:pass right out of the
> URL...
>
> I've also tried the following variant:
>
> print read [
> scheme: 'http
> user: "webuser"
> pass: "letmein"
> host: "127.0.0.1/mysite/"
> ]
>
> with the same results.  Is this just broken?
>
> - Porter Woodward
>
>

Reply via email to