HTTPProtocol Class Reference
Inheritance diagram for HTTPProtocol:

Detailed Description
Definition at line 49 of file http.h.
Public Types | |
enum | HTTP_REV { HTTP_None, HTTP_Unknown, HTTP_10, HTTP_11, SHOUTCAST } |
enum | HTTP_AUTH { AUTH_None, AUTH_Basic, AUTH_NTLM, AUTH_Digest, AUTH_Negotiate } |
Public Member Functions | |
HTTPProtocol (const QCString &protocol, const QCString &pool, const QCString &app) | |
virtual | ~HTTPProtocol () |
virtual void | setHost (const QString &host, int port, const QString &user, const QString &pass) |
virtual void | slave_status () |
virtual void | get (const KURL &url) |
virtual void | put (const KURL &url, int permissions, bool overwrite, bool resume) |
virtual void | listDir (const KURL &url) |
virtual void | mkdir (const KURL &url, int permissions) |
virtual void | rename (const KURL &src, const KURL &dest, bool overwrite) |
virtual void | copy (const KURL &src, const KURL &dest, int permissions, bool overwrite) |
virtual void | del (const KURL &url, bool isfile) |
bool | davHostOk () |
void | davGeneric (const KURL &url, KIO::HTTP_METHOD method) |
void | davLock (const KURL &url, const QString &scope, const QString &type, const QString &owner) |
void | davUnlock (const KURL &url) |
void | davFinished () |
QString | davError (int code=-1, QString url=QString::null) |
virtual void | special (const QByteArray &data) |
virtual void | mimetype (const KURL &url) |
virtual void | stat (const KURL &url) |
virtual void | reparseConfiguration () |
virtual void | closeConnection () |
void | post (const KURL &url) |
void | multiGet (const QByteArray &data) |
bool | checkRequestURL (const KURL &) |
void | cacheUpdate (const KURL &url, bool nocache, time_t expireDate) |
void | httpError () |
bool | isOffline (const KURL &url) |
Protected Slots | |
void | slotData (const QByteArray &) |
void | error (int _errid, const QString &_text) |
Protected Member Functions | |
int | readChunked () |
int | readLimited () |
int | readUnlimited () |
ssize_t | write (const void *buf, size_t nbytes) |
ssize_t | read (void *b, size_t nbytes) |
char * | gets (char *str, int size) |
void | setRewindMarker () |
void | rewind () |
void | addEncoding (QString, QStringList &) |
void | configAuth (char *, bool) |
bool | httpOpen () |
void | httpClose (bool keepAlive) |
bool | httpOpenConnection () |
void | httpCloseConnection () |
void | httpCheckConnection () |
void | forwardHttpResponseHeader () |
bool | readHeader () |
bool | sendBody () |
bool | readBody (bool dataInternal=false) |
void | davSetRequest (const QCString &requestXML) |
void | davStatList (const KURL &url, bool stat=true) |
void | davParsePropstats (const QDomNodeList &propstats, KIO::UDSEntry &entry) |
void | davParseActiveLocks (const QDomNodeList &activeLocks, uint &lockCount) |
long | parseDateTime (const QString &input, const QString &type) |
int | codeFromResponse (const QString &response) |
QString | davProcessLocks () |
void | addCookies (const QString &url, const QCString &cookieHeader) |
QString | findCookies (const QString &url) |
FILE * | checkCacheEntry (bool readWrite=false) |
void | createCacheEntry (const QString &mimetype, time_t expireDate) |
void | writeCacheEntry (const char *buffer, int nbytes) |
void | closeCacheEntry () |
void | updateExpireDate (time_t expireDate, bool updateCreationDate=false) |
void | cleanCache () |
void | retrieveContent (bool dataInternal=false) |
bool | retrieveHeader (bool close_connection=true) |
void | resetSessionSettings () |
void | resetResponseSettings () |
void | resetConnectionSettings () |
QString | proxyAuthenticationHeader () |
bool | getAuthorization () |
void | saveAuthorization () |
QString | createBasicAuth (bool isForProxy=false) |
QString | createDigestAuth (bool isForProxy=false) |
QString | createNTLMAuth (bool isForProxy=false) |
QString | createNegotiateAuth () |
QCString | gssError (int major_status, int minor_status) |
void | calculateResponse (DigestAuthInfo &info, QCString &Response) |
bool | retryPrompt () |
void | promptInfo (KIO::AuthInfo &info) |
Protected Attributes | |
HTTPState | m_state |
HTTPRequest | m_request |
QPtrList< HTTPRequest > | m_requestQueue |
bool | m_bBusy |
bool | m_bEOF |
bool | m_bEOD |
QStringList | m_responseHeader |
KURL | m_redirectLocation |
bool | m_bRedirect |
bool | m_bChunked |
KIO::filesize_t | m_iSize |
KIO::filesize_t | m_iBytesLeft |
KIO::filesize_t | m_iContentLeft |
QByteArray | m_bufReceive |
bool | m_dataInternal |
char | m_lineBuf [1024] |
char | m_rewindBuf [8192] |
size_t | m_rewindCount |
char * | m_linePtr |
size_t | m_lineCount |
char * | m_lineBufUnget |
char * | m_linePtrUnget |
size_t | m_lineCountUnget |
bool | m_cpMimeBuffer |
QByteArray | m_mimeTypeBuffer |
QStringList | m_qTransferEncodings |
QStringList | m_qContentEncodings |
QString | m_sContentMD5 |
QString | m_strMimeType |
QByteArray | m_bufWebDavData |
QStringList | m_davCapabilities |
bool | m_davHostOk |
bool | m_davHostUnsupported |
QByteArray | m_bufPOST |
int | m_maxCacheAge |
long | m_maxCacheSize |
QString | m_strCacheDir |
bool | m_bUseProxy |
bool | m_bNeedTunnel |
bool | m_bIsTunneled |
bool | m_bProxyAuthValid |
int | m_iProxyPort |
KURL | m_proxyURL |
QString | m_strProxyRealm |
QCString | m_protocol |
QString | m_strRealm |
QString | m_strAuthorization |
QString | m_strProxyAuthorization |
HTTP_AUTH | Authentication |
HTTP_AUTH | ProxyAuthentication |
bool | m_bUnauthorized |
short unsigned int | m_iProxyAuthCount |
short unsigned int | m_iWWWAuthCount |
bool | m_bFirstRequest |
bool | m_bKeepAlive |
int | m_keepAliveTimeout |
bool | m_bPersistentProxyConnection |
bool | m_bError |
unsigned int | m_responseCode |
unsigned int | m_prevResponseCode |
int | m_proxyConnTimeout |
int | m_remoteConnTimeout |
int | m_remoteRespTimeout |
int | m_pid |
Classes | |
struct | DAVRequest |
DAV-specific request elements for the current connection. More... | |
struct | DigestAuthInfo |
struct | HTTPRequest |
The request for the current connection. More... | |
struct | HTTPState |
State of the current Connection. More... |
Member Enumeration Documentation
|
Authorization method used.
|
|
HTTP version.
|
Member Function Documentation
|
Send a cookie to the cookiejar.
|
|
Add an encoding on to the appropriate stack this is nececesary because transfer encodings and content encodings must be handled separately.
|
|
Calcualtes the message digest response based on RFC 2617.
|
|
Do a cache lookup for the current url. (m_state.url)
|
|
Quick check whether the cache needs cleaning.
|
|
Close cache entry.
|
|
Returns the error code from a "HTTP/1.1 code Code Name" string.
|
|
Creates the entity-header for Basic authentication.
|
|
Create a cache entry for the current url. (m_state.url) Set the contents type of the cache entry to 'mimetype'. |
|
Creates the entity-header for Digest authentication.
|
|
Creates the entity-header for Negotiate authentication.
|
|
Creates the entity-header for NTLM authentication.
|
|
Extracts locks from metadata Returns the appropriate If: header.
|
|
Performs a WebDAV stat or list.
|
|
Look for cookies in the cookiejar.
|
|
Retrieves authorization info from cache or user.
|
|
create GSS error string
|
|
This function is responsible for opening up the connection to the remote HTTP server and sending the header. If this requires special authentication or other such fun stuff, then it will handle it. This function will NOT receive anything from the server, however. This is in contrast to previous incarnations of 'httpOpen'. The reason for the change is due to one small fact: some requests require data to be sent in addition to the header (POST requests) and there is no way for this function to get that data. This function is called in the slotPut() or slotGet() functions which, in turn, are called (indirectly) as a result of a KIOJob::put() or KIOJob::get(). It is those latter functions which are responsible for starting up this ioslave in the first place. This means that 'httpOpen' is called (essentially) as soon as the ioslave is created -- BEFORE any data gets to this slave. The basic process now is this: 1) Open up the socket and port 2) Format our request/header 3) Send the header to the remote server |
|
Parses a date & time string.
|
|
Creates authorization prompt info.
|
|
Returns any pre-cached proxy authentication info info in HTTP header format.
|
|
Another "smart" wrapper, this time around read that will use SSL_read or read(2) depending on whether you've got an SSL connection or not.
|
|
This function is our "receive" function. It is responsible for downloading the message (not the header) from the HTTP server. It is called either as a response to a client's KIOJob::dataEnd() (meaning that the client is done sending data) or by 'httpOpen()' (if we are in the process of a PUT/POST request). It can also be called by a webDAV function, to receive stat/list/property/etc. data; in this case the data is stored in m_bufWebDavData. |
|
Read a chunk from the data stream.
|
|
This function will read in the return header from the server. It will not read in the body of the return message. It will also not transmit the header to our client as the client doesn't need to know the gory details of HTTP headers. |
|
Resets any per connection settings. These are different from per-session settings in that they must be invalidates every time a request is made, e.g. a retry to re-send the header to the server, as compared to only when a new request arrives. |
|
Resets settings related to parsing a response.
|
|
Resets any per session settings.
|
|
Performs a GET HTTP request.
|
|
Performs a HEAD HTTP request.
|
|
Prompts the user for authorization retry.
|
|
Saves valid authorization info in the cache daemon.
|
|
Special commands supported by this slave : 1 - HTTP POST 2 - Cache has been updated 3 - SSL Certificate Cache has been updated 4 - HTTP multi get 5 - DAV LOCK (see 6 - DAV UNLOCK README.webdav).
|
|
Update expire time of current cache entry.
|
|
A "smart" wrapper around write that will use SSL_write or write(2) depending on whether you've got an SSL connection or not. The only shortcomming is that it uses the "global" file handles and soforth. So you can't really use this on individual files/sockets. |
|
Write data to cache. Write 'nbytes' from 'buffer' to the Cache Entry File |
The documentation for this class was generated from the following files: