KIOSlave
http.cpp File Reference
#include "http.h"
#include <config.h>
#include <fcntl.h>
#include <utime.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
#include <QtXml/qdom.h>
#include <QtCore/QFile>
#include <QtCore/QRegExp>
#include <QtCore/QDate>
#include <QtCore/QBuffer>
#include <QtCore/QIODevice>
#include <QtDBus/QtDBus>
#include <QtNetwork/QAuthenticator>
#include <QtNetwork/QNetworkProxy>
#include <QtNetwork/QTcpSocket>
#include <kurl.h>
#include <kdebug.h>
#include <klocale.h>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <kservice.h>
#include <kdatetime.h>
#include <kcomponentdata.h>
#include <kmimetype.h>
#include <ktoolinvocation.h>
#include <kstandarddirs.h>
#include <kremoteencoding.h>
#include <ktcpsocket.h>
#include <kmessagebox.h>
#include <kio/ioslave_defaults.h>
#include <kio/http_slave_defaults.h>
#include <httpfilter.h>
#include <solid/networking.h>
#include <kapplication.h>
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kde_file.h>
#include <ktemporaryfile.h>
#include "httpauthentication.h"
#include "parsinghelpers.h"
#include "parsinghelpers.cpp"
#include "http.moc"
Go to the source code of this file.
Macros | |
#define | NO_SIZE ((KIO::filesize_t) -1) |
#define | QT_NO_CAST_FROM_ASCII |
#define | STRTOLL strtol |
Enumerations | |
enum | CacheCleanerCommandCode { InvalidCommand = 0 , CreateFileNotificationCommand , UpdateFileCommand } |
Functions | |
static bool | canHaveResponseBody (int responseCode, KIO::HTTP_METHOD method) |
static void | changeProtocolToHttp (KUrl *url) |
static bool | compareByte (QDataStream *stream, quint8 value) |
static bool | consume (const char input[], int *pos, int end, const char *term) |
static QIODevice * | createPostBufferDeviceFor (KIO::filesize_t size) |
static QString | filenameFromUrl (const KUrl &url) |
static QString | formatHttpDate (qint64 date) |
static QString | htmlEscape (const QString &plain) |
static int | httpDelError (const HTTPProtocol::HTTPRequest &request, QString *errorString) |
static int | httpGenericError (const HTTPProtocol::HTTPRequest &request, QString *errorString) |
static int | httpPutError (const HTTPProtocol::HTTPRequest &request, QString *errorString) |
static bool | isAuthenticationRequired (int responseCode) |
static bool | isCompatibleNextUrl (const KUrl &previous, const KUrl &now) |
static bool | isCrossDomainRequest (const QString &fqdn, const QString &originURL) |
static bool | isEncryptedHttpVariety (const QByteArray &p) |
static bool | isHttpProxy (const KUrl &u) |
static bool | isPotentialSpoofingAttack (const HTTPProtocol::HTTPRequest &request, const KConfigGroup *config) |
static bool | isValidProxy (const KUrl &u) |
int | kdemain (int argc, char **argv) |
static QByteArray | makeCacheCleanerCommand (const HTTPProtocol::CacheTag &cacheTag, CacheCleanerCommandCode cmd) |
static qint64 | parseDateTime (const QString &input, const QString &type) |
static QString | protocolForProxyType (QNetworkProxy::ProxyType type) |
static bool | readLineChecked (QIODevice *dev, QByteArray *line) |
static QString | sanitizeCustomHTTPHeader (const QString &_header) |
static KUrl | storableUrl (const KUrl &url) |
static bool | supportedProxyScheme (const QString &scheme) |
static QString | toQString (const QByteArray &value) |
static qint64 | toTime_t (const QString &value, KDateTime::TimeFormat format) |
static void | updateUDSEntryMimeType (UDSEntry *entry) |
static void | writeLine (QIODevice *dev, const QByteArray &line) |
Variables | |
static const int | s_hashedUrlBits = 160 |
static const int | s_hashedUrlBytes = s_hashedUrlBits / 8 |
static const int | s_hashedUrlNibbles = s_hashedUrlBits / 4 |
static const int | s_MaxInMemPostBufSize = 256 * 1024 |
Macro Definition Documentation
◆ NO_SIZE
#define NO_SIZE ((KIO::filesize_t) -1) |
◆ QT_NO_CAST_FROM_ASCII
◆ STRTOLL
Enumeration Type Documentation
◆ CacheCleanerCommandCode
Function Documentation
◆ canHaveResponseBody()
|
static |
◆ changeProtocolToHttp()
◆ compareByte()
|
static |
◆ consume()
|
static |
◆ createPostBufferDeviceFor()
|
static |
◆ filenameFromUrl()
◆ formatHttpDate()
◆ htmlEscape()
◆ httpDelError()
|
static |
◆ httpGenericError()
|
static |
◆ httpPutError()
|
static |
◆ isAuthenticationRequired()
|
static |
◆ isCompatibleNextUrl()
◆ isCrossDomainRequest()
|
static |
◆ isEncryptedHttpVariety()
|
static |
◆ isHttpProxy()
◆ isPotentialSpoofingAttack()
|
static |
◆ isValidProxy()
◆ kdemain()
◆ makeCacheCleanerCommand()
|
static |
◆ parseDateTime()
|
static |
◆ protocolForProxyType()
|
static |
◆ readLineChecked()
|
static |
◆ sanitizeCustomHTTPHeader()
|
static |
◆ storableUrl()
◆ supportedProxyScheme()
|
static |
◆ toQString()
|
static |
◆ toTime_t()
|
static |
◆ updateUDSEntryMimeType()
|
static |
◆ writeLine()
|
static |
Variable Documentation
◆ s_hashedUrlBits
◆ s_hashedUrlBytes
|
static |
◆ s_hashedUrlNibbles
|
static |
◆ s_MaxInMemPostBufSize
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.