Custom headers HTTP protected site

Jim Ault jimaultwins at yahoo.com
Fri Oct 9 17:14:49 EDT 2009


I am trying to understand how HTTP headers work with password  
protected sites and file downloads.

I am registered with a fantasy sports pool (free) and want to access a  
downloadable text file.

The key is to use Rev to download then to a spreadsheet.
This works manually.
      http;//BHQlogin:BHQpasswd at www.baseballhq.com/members/tools/projections/proj.php 
"
right click => to download


Question      What am I missing?
I set the libURLSetCustomHTTPHeaders == those used by the actual  
browser but get a blank page.

Now trying to use
      libURLSetCustomHTTPHeaders  +  libURLLastHTTPHeaders()

and the power of LiveHeaders in the FireFox browser

Here is the simple effort
--> the url works in a browser, but not from a Rev script

    get 'http;//BHQlogin:BHQpasswd at www.baseballhq.com/'
    get it & "members/tools/"
    get it & "projections/proj.php?"
    get it & "lg=N&p=P&t=PY"
    put url it into allPitchersBlock

-----
<h1 >Access Denied</h1>
<p>Unfortunately, there was problems accessing the page you tried to  
request.

---------------
  then using  libURLLastHTTPHeaders()
GET /members/tools/projections/proj.php?lg=N&p=P&t=PY HTTP/1.1
Host: wvw.baseballhq.com
User-Agent: Revolution (MacOS)
Authorization: Basic cm90b3Bhc3MyOjUzcHJpbnQ0Ng==


---------------
----however, using LiveHeaders and the real url in the browser yields
Since this is LONG message, please click on the link to open a web  
page in your browser

http://jimthewebmaster.coml/userevLongMsgHeaders.html

Thanks

Jim Ault
Las Vegas



More information about the use-livecode mailing list