|
Public Types |
enum | HTTP_AUTH {
AUTH_None,
AUTH_Basic,
AUTH_NTLM,
AUTH_Digest,
AUTH_Negotiate
} |
enum | HTTP_REV {
HTTP_None,
HTTP_Unknown,
HTTP_10,
HTTP_11,
SHOUTCAST
} |
Public Member Functions |
void | cacheUpdate (const KUrl &url, bool nocache, time_t expireDate) |
bool | checkRequestUrl (const KUrl &) |
virtual void | closeConnection () |
virtual void | copy (const KUrl &src, const KUrl &dest, int _permissions, KIO::JobFlags flags) |
QString | davError (int code=-1, const QString &url=QString()) |
void | davFinished () |
void | davGeneric (const KUrl &url, KIO::HTTP_METHOD method) |
bool | davHostOk () |
void | davLock (const KUrl &url, const QString &scope, const QString &type, const QString &owner) |
void | davUnlock (const KUrl &url) |
virtual void | del (const KUrl &url, bool _isfile) |
virtual void | get (const KUrl &url) |
void | httpError () |
| HTTPProtocol (const QByteArray &protocol, const QByteArray &pool, const QByteArray &app) |
bool | isOffline (const KUrl &url) |
virtual void | listDir (const KUrl &url) |
virtual void | mimetype (const KUrl &url) |
virtual void | mkdir (const KUrl &url, int _permissions) |
void | multiGet (const QByteArray &data) |
void | post (const KUrl &url) |
virtual void | put (const KUrl &url, int _mode, KIO::JobFlags flags) |
virtual void | rename (const KUrl &src, const KUrl &dest, KIO::JobFlags flags) |
virtual void | reparseConfiguration () |
virtual void | setHost (const QString &host, quint16 port, const QString &user, const QString &pass) |
virtual void | slave_status () |
virtual void | special (const QByteArray &data) |
virtual void | stat (const KUrl &url) |
virtual | ~HTTPProtocol () |
Protected Slots |
void | error (int _errid, const QString &_text) |
void | slotData (const QByteArray &) |
Protected Member Functions |
void | addCookies (const QString &url, const QByteArray &cookieHeader) |
void | addEncoding (const QString &, QStringList &) |
void | calculateResponse (DigestAuthInfo &info, QByteArray &Response) |
gzFile | checkCacheEntry (bool readWrite=false) |
void | cleanCache () |
void | closeCacheEntry () |
int | codeFromResponse (const QString &response) |
void | configAuth (char *, bool) |
QString | createBasicAuth (bool isForProxy=false) |
void | createCacheEntry (const QString &mimetype, time_t expireDate) |
QString | createDigestAuth (bool isForProxy=false) |
QString | createNegotiateAuth () |
QString | createNTLMAuth (bool isForProxy=false) |
void | davParseActiveLocks (const QDomNodeList &activeLocks, uint &lockCount) |
void | davParsePropstats (const QDomNodeList &propstats, KIO::UDSEntry &entry) |
QString | davProcessLocks () |
void | davSetRequest (const QByteArray &requestXML) |
void | davStatList (const KUrl &url, bool stat=true) |
QString | findCookies (const QString &url) |
void | forwardHttpResponseHeader () |
bool | getAuthorization () |
char * | gets (char *str, int size) |
QByteArray | gssError (int major_status, int minor_status) |
void | httpClose (bool keepAlive) |
void | httpCloseConnection () |
bool | httpOpenConnection () |
bool | httpShouldCloseConnection () |
void | parseContentDisposition (const QString &disposition) |
long | parseDateTime (const QString &input, const QString &type) |
void | proceedUntilResponseContent (bool dataInternal=false) |
bool | proceedUntilResponseHeader () |
void | promptInfo (KIO::AuthInfo &info) |
QString | proxyAuthenticationHeader () |
ssize_t | read (void *b, size_t nbytes) |
bool | readBody (bool dataInternal=false) |
int | readChunked () |
bool | readHeaderFromCache () |
int | readLimited () |
bool | readResponseHeader () |
int | readUnlimited () |
void | resetConnectionSettings () |
void | resetResponseSettings () |
void | resetSessionSettings () |
bool | retryPrompt () |
void | rewind () |
void | saveAuthorization () |
bool | sendBody () |
bool | sendQuery () |
void | setRewindMarker () |
void | updateExpireDate (time_t expireDate, bool updateCreationDate=false) |
ssize_t | write (const void *buf, size_t nbytes) |
void | writeCacheEntry (const char *buffer, int nbytes) |
Protected Attributes |
HTTP_AUTH | Authentication |
bool | m_bBusy |
bool | m_bChunked |
bool | m_bEOD |
bool | m_bEOF |
bool | m_bError |
bool | m_bFirstRequest |
bool | m_bIsTunneled |
bool | m_bKeepAlive |
bool | m_bNeedTunnel |
bool | m_bPersistentProxyConnection |
bool | m_bProxyAuthValid |
bool | m_bRedirect |
QByteArray | m_bufPOST |
QByteArray | m_bufReceive |
QByteArray | m_bufWebDavData |
bool | m_bUnauthorized |
bool | m_bUseProxy |
bool | m_cpMimeBuffer |
bool | m_dataInternal |
QStringList | m_davCapabilities |
bool | m_davHostOk |
bool | m_davHostUnsupported |
quint16 | m_defaultPort |
KIO::filesize_t | m_iBytesLeft |
KIO::filesize_t | m_iContentLeft |
short unsigned int | m_iProxyAuthCount |
int | m_iProxyPort |
KIO::filesize_t | m_iSize |
short unsigned int | m_iWWWAuthCount |
int | m_keepAliveTimeout |
char | m_lineBuf [1024] |
char * | m_lineBufUnget |
size_t | m_lineCount |
size_t | m_lineCountUnget |
char * | m_linePtr |
char * | m_linePtrUnget |
int | m_maxCacheAge |
long | m_maxCacheSize |
QByteArray | m_mimeTypeBuffer |
unsigned int | m_prevResponseCode |
QByteArray | m_protocol |
KUrl | m_proxyURL |
QStringList | m_qContentEncodings |
QStringList | m_qTransferEncodings |
int | m_remoteRespTimeout |
HTTPRequest | m_request |
QList< HTTPRequest * > | m_requestQueue |
unsigned int | m_responseCode |
QStringList | m_responseHeaders |
char | m_rewindBuf [8192] |
size_t | m_rewindCount |
QString | m_sContentMD5 |
HTTPState | m_state |
QString | m_strAuthorization |
QString | m_strCacheDir |
QString | m_strMimeType |
QString | m_strProxyAuthorization |
QString | m_strProxyRealm |
QString | m_strRealm |
HTTP_AUTH | ProxyAuthentication |
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 |
| HTTP / DAV method. More...
|
bool HTTPProtocol::readBody |
( |
bool |
dataInternal = false |
) |
[protected] |
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 'sendQuery()' (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.
Definition at line 4183 of file http.cpp.
void HTTPProtocol::resetConnectionSettings |
( |
|
) |
[protected] |
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.
Definition at line 239 of file http.cpp.
bool HTTPProtocol::sendQuery |
( |
|
) |
[protected] |
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' as this method used to be called.
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 4) Call sendBody() if the HTTP method requires sending body data
Definition at line 1995 of file http.cpp.