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

HTTP Authentication

 [1/9] from: brett::codeconscious::com at: 21-Sep-2000 11:15


When I point my browser to a particular website it displays a dialog box asking for username and password, to which I fill it in and I get my info. How do I achieve this with Rebol? Thanks, Brett. --
>> my-rebol-stuff
== http://www.codeconscious.com/

 [2/9] from: larry:ecotope at: 20-Sep-2000 18:14


Hi Brett You can connect this way: print read http://usrname:[password--www--somesite--com]/ HTH -Larry

 [3/9] from: brett:codeconscious at: 21-Sep-2000 12:30


Thanks Larry but no go. It returned: HTTP/1.1 403 Forbidden. Have you seen the method you suggested work? Wondering if it is the server I'm trying to access. Brett.

 [4/9] from: larry:ecotope at: 20-Sep-2000 18:50


Hi Brett I don't have a setup to use this for http, but I often use it with ftp. AFAIK this is the standard URL format for accessing a password protected http site. You might need to specify a path/page. -Larry

 [5/9] from: brian:hawley:bigfoot at: 20-Sep-2000 23:03


[larry--ecotope--com] wrote:
> > Hi Brett > > > > You can connect this way: > > > > print read http://usrname:[password--www--somesite--com]/
[brett--codeconscious--com] wrote:
>Thanks Larry but no go. It returned: > >HTTP/1.1 403 Forbidden. > >Have you seen the method you suggested work? Wondering if >it is the server I'm trying to access.
There are two main ways to authenticate an http connection, Basic and Digest. Basic is clear-text, Digest is encrypted. REBOL, like most languages without encryption support, does not support Digest authentication, just Basic. Basic is all you need for most web sites. Unfortunately for you, web servers set up to use the Digest method generally don't accept a Basic request. You may be out of luck with straight REBOL. Try an http proxy server. It worked for me once a while ago. Brian Hawley

 [6/9] from: brett:codeconscious at: 21-Sep-2000 15:29


When I point my browser to a particular website it displays a dialog box asking for username and password, to which I fill it in and I get my info. But alas alack Rebol cannot get my info for me. I've used the URL format and the block specification format to include username and password. Having used proxy.r and skimming the http scheme to give me a bit more info on what is going on, I can see that Basic Authorization is supported by Rebol and is creating the same authorization header that Internet Explorer does - first off. There are two things happening that maybe causing Rebol to go off track: (1) At the URL I must use, the server responds with a 302 - temporarily moved status. (2) The URL as specified by the location header of the response in (1) refers to a specific port. I can see that Rebol has been coded to handle (1) but I wonder if it is handling (1) and (2) correctly when Basic Authorization is involved. Unfortunately my comprehension of the network handler code was stretched to go this far, so I cannot say for sure that they are/are not working properly. Further, I got it working for a page (cgi) linked off my target page. (Yippee - 'cause this is the one I really want - for now....) and remember IE works for the target page. I haven't discounted the possiblity that the server is biased towards some user-agents or is doing something particularly bizarre - but I think this is a low chance possibility. I cannot get any more info, since Rebol using proxy.r as proxy cannot handle the 302 and creates an infinite loop of requests. So all up, methinks there be a bug lurking in the http scheme - an' boy ain't it nimble. Brett. cc'd Feedback.

 [7/9] from: sharriff:aina:med-iq at: 21-Sep-2000 10:13


>Further, I got it working for a page (cgi) linked off my target page. >(Yippee - 'cause this is the one I really want - for now....) >and remember IE works for the target page. I haven't discounted the >possiblity that the server is biased towards some user-agents or is doing >something particularly bizarre - but I think this is a low chance >possibility.
Hi! I would like to implement the same functionality for my web-ste too, could you give me a detailed instuction how how got it to work? Best regards Sharriff

 [8/9] from: brett:codeconscious at: 21-Sep-2000 22:16


Hi Sharriff, I think you may have misunderstood what I was writing about. I have not created the CGI with Rebol. I am just requesting (READing) it in Rebol with authentication. Let me know if I have got this wrong. Brett.

 [9/9] from: sharriff:aina:med-iq at: 21-Sep-2000 12:54


Oh! I thought you meant a login form created with a Rebol CGI script that request access to a HTTP 1.0 protected site "either?" Regards Sharriff Aina med.iq information & quality in healthcare AG Gutenbergstr. 42 41564 Kaarst tel.: 02131-3669-0 fax: 02131-3669-599 www.med-iq.de