• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.2 API Reference
  • KDE Home
  • Contact Us
 

KIOSlave

  • kioslave
  • http
Macros | Enumerations | Functions | Variables
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 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 QString protocolForProxyType (QNetworkProxy::ProxyType type)
 
static bool readLineChecked (QIODevice *dev, QByteArray *line)
 
static bool readTime (QDataStream *stream, time_t *time)
 
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 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

#define NO_SIZE   ((KIO::filesize_t) -1)

Definition at line 369 of file http.cpp.

#define QT_NO_CAST_FROM_ASCII

Definition at line 29 of file http.cpp.

#define STRTOLL   strtol

Definition at line 374 of file http.cpp.

Enumeration Type Documentation

enum CacheCleanerCommandCode
Enumerator
InvalidCommand 
CreateFileNotificationCommand 
UpdateFileCommand 

Definition at line 4649 of file http.cpp.

Function Documentation

static bool canHaveResponseBody ( int  responseCode,
KIO::HTTP_METHOD  method 
)
static

Definition at line 227 of file http.cpp.

static bool compareByte ( QDataStream *  stream,
quint8  value 
)
static

Definition at line 4686 of file http.cpp.

static bool consume ( const char  input[],
int *  pos,
int  end,
const char *  term 
)
static

Definition at line 2867 of file http.cpp.

static QIODevice* createPostBufferDeviceFor ( KIO::filesize_t  size)
static

Definition at line 286 of file http.cpp.

static QString filenameFromUrl ( const KUrl &  url)
static

Definition at line 4843 of file http.cpp.

static QString formatHttpDate ( qint64  date)
static

Definition at line 350 of file http.cpp.

static QString htmlEscape ( const QString &  plain)
static

Definition at line 91 of file http.cpp.

static int httpDelError ( const HTTPProtocol::HTTPRequest &  request,
QString *  errorString 
)
static

Definition at line 1792 of file http.cpp.

static int httpGenericError ( const HTTPProtocol::HTTPRequest &  request,
QString *  errorString 
)
static

Definition at line 1777 of file http.cpp.

static int httpPutError ( const HTTPProtocol::HTTPRequest &  request,
QString *  errorString 
)
static

Definition at line 1819 of file http.cpp.

static bool isAuthenticationRequired ( int  responseCode)
static

Definition at line 364 of file http.cpp.

static bool isCompatibleNextUrl ( const KUrl &  previous,
const KUrl &  now 
)
static

Definition at line 2147 of file http.cpp.

static bool isCrossDomainRequest ( const QString &  fqdn,
const QString &  originURL 
)
static

Definition at line 149 of file http.cpp.

static bool isEncryptedHttpVariety ( const QByteArray &  p)
static

Definition at line 271 of file http.cpp.

static bool isHttpProxy ( const KUrl &  u)
static

Definition at line 281 of file http.cpp.

static bool isPotentialSpoofingAttack ( const HTTPProtocol::HTTPRequest &  request,
const KConfigGroup *  config 
)
static

Definition at line 206 of file http.cpp.

static bool isValidProxy ( const KUrl &  u)
static

Definition at line 276 of file http.cpp.

int kdemain ( int  argc,
char **  argv 
)

Definition at line 125 of file http.cpp.

static QByteArray makeCacheCleanerCommand ( const HTTPProtocol::CacheTag &  cacheTag,
CacheCleanerCommandCode  cmd 
)
static

Definition at line 4930 of file http.cpp.

static QString protocolForProxyType ( QNetworkProxy::ProxyType  type)
static

Definition at line 5202 of file http.cpp.

static bool readLineChecked ( QIODevice *  dev,
QByteArray *  line 
)
static

Definition at line 4780 of file http.cpp.

static bool readTime ( QDataStream *  stream,
time_t *  time 
)
static

Definition at line 4693 of file http.cpp.

static QString sanitizeCustomHTTPHeader ( const QString &  _header)
static

Definition at line 183 of file http.cpp.

static KUrl storableUrl ( const KUrl &  url)
static

Definition at line 4749 of file http.cpp.

static bool supportedProxyScheme ( const QString &  scheme)
static

Definition at line 111 of file http.cpp.

static QString toQString ( const QByteArray &  value)
static

Definition at line 144 of file http.cpp.

static void writeLine ( QIODevice *  dev,
const QByteArray &  line 
)
static

Definition at line 4757 of file http.cpp.

Variable Documentation

const int s_hashedUrlBits = 160
static

Definition at line 118 of file http.cpp.

const int s_hashedUrlBytes = s_hashedUrlBits / 8
static

Definition at line 120 of file http.cpp.

const int s_hashedUrlNibbles = s_hashedUrlBits / 4
static

Definition at line 119 of file http.cpp.

const int s_MaxInMemPostBufSize = 256 * 1024
static

Definition at line 121 of file http.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Apr 16 2013 19:16:07 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIOSlave

Skip menu "KIOSlave"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.10.2 API Reference

Skip menu "kdelibs-4.10.2 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal