88 static void SetProxy(
const char *url);
#define ClassDef(name, id)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Abstract base class defining a generic interface to the underlying Operating System.
This class represents a WWW compatible URL.
virtual Int_t GetLine(TSocket *s, char *line, Int_t maxsize)
Read a line from the socket.
virtual ~TWebFile()
Cleanup.
virtual Int_t GetHead()
Get the HTTP header.
virtual Int_t ReOpen(Option_t *mode)
Reopen a file with a different access mode, like from READ to UPDATE or from NEW, CREATE,...
virtual Int_t GetFromWeb(char *buf, Int_t len, const TString &msg)
Read request from web server.
virtual TString BasicAuthentication()
Return basic authentication scheme, to be added to the request.
virtual void SetMsgReadBuffer10(const char *redirectLocation=0, Bool_t tempRedirect=kFALSE)
Set GET command for use by ReadBuffer(s)10(), handle redirection if needed.
virtual void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Set position from where to start reading.
static const char * GetProxy()
Static method returning the global proxy URL.
static void SetProxy(const char *url)
Static method setting global proxy URL.
virtual const char * HttpTerminator(const char *start, const char *peeked, Int_t peeklen)
Determine whether [START, PEEKED + PEEKLEN) contains an HTTP new line [\r]\n.
virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read specified byte ranges from remote file via HTTP daemon.
virtual Int_t GetFromCache(char *buf, Int_t len, Int_t nseg, Long64_t *seg_pos, Int_t *seg_len)
Extract requested segments from the cached content.
virtual void CheckProxy()
Check if shell var "http_proxy" has been set and should be used.
virtual Bool_t ReadBuffers10(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read specified byte ranges from remote file via HTTP 1.0 daemon (without mod-root installed).
Long64_t fFullCacheSize
complete content of the file, some http server may return complete content
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Read specified byte range from remote file via HTTP daemon.
virtual Bool_t ReadBuffer10(char *buf, Int_t len)
Read specified byte range from remote file via HTTP 1.0 daemon (without mod-root installed).
virtual void Init(Bool_t readHeadOnly)
Initialize a TWebFile object.
virtual Long64_t GetSize() const
Return maximum file size.
virtual Bool_t IsOpen() const
A TWebFile that has been correctly constructed is always considered open.
static TUrl fgProxy
size of the cached content
static void SetMaxFullCacheSize(Long64_t sz)
Static method, set maxmimal size of full cache,.
virtual Int_t GetFromWeb10(char *buf, Int_t len, const TString &msg, Int_t nseg=0, Long64_t *seg_pos=0, Int_t *seg_len=0)
Read multiple byte range request from web server.
static Long64_t GetMaxFullCacheSize()
Static method returning maxmimal size of full cache, which can be preserved by file instance.
virtual void ProcessHttpHeader(const TString &headerLine)
Process the HTTP header in the argument.
virtual Int_t GetHunk(TSocket *s, char *hunk, Int_t maxsize)
Read a hunk of data from the socket, up until a terminator.
static Long64_t fgMaxFullCacheSize
void * OpenDirectory(const char *name)
Open a directory via httpd.
TWebSystem()
Create helper class that allows directory access via httpd.
Bool_t AccessPathName(const char *path, EAccessMode mode)
Returns FALSE if one can access a file using the specified access mode.
void FreeDirectory(void *dirp)
Free directory via httpd.
const char * GetDirEntry(void *dirp)
Get directory entry via httpd. Returns 0 in case no more entries.
Int_t MakeDirectory(const char *name)
Make a directory via httpd. Not supported.
Int_t GetPathInfo(const char *path, FileStat_t &buf)
Get info about a file.
Int_t Unlink(const char *path)
Unlink, i.e.
static constexpr double s