How to read password potected https file with TFile::Open

Hello,

We would like to ask how to read a root file via the HTTP server after the site URL was renamed
from http:// to . The site is now password protected. Here are the commands that have
been tried (using example names) and the error messages:

  1. case
    root [1] TFile *_file0 = TFile::Open(“https://username:password@ourserver.cern.ch/myDir/myFile.root”)
    Error in TFile::TFile: file myDir/myFile.root does not exist

  2. case, just to illustrate the error message
    root [2] TFile *_file0 = TFile::Open(“http://username:password@someserver.cern.ch/myDir/myFile.root”)
    Error in TWebFile::GetHead: cannot connect to host (errno=2)
    Error in TWebSocket::ReOpen: cannot connect to host (errno=2)
    Error in TWebFile::GetFromWeb10: cannot connect to host

The wget command works, e.g.
wget --no-check-certificate username:password@ourserver.cer … yFile.root

It would be helpful if you would you give us a hint if our command (in 1. case above) was wrong
and how to workaround or solve this issue.

Cheers,
Ivana

Hi Ivana,

can you run this command with gDebug>1 and let me know what the header is that is returned when you access without user:passwd. We currently only support Basic Auth and not Digest Auth. I need to know what the server requires.

Cheers, Fons.