PACK Qt Binding  $VERSION$
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Friends | List of all members
WServerRequest Class Reference

Encapsulates the request as it comes in via (S)CGI. More...

#include <server.h>

Public Member Functions

 WServerRequest ()
 instantiates an empty request More...
 
 WServerRequest (const WServerRequest &)
 copies a request More...
 
WServerRequestoperator= (const WServerRequest &)
 copies a request More...
 
bool hasHeader (const QString &) const
 checks HTTP level header for its existence, in (S)CGI these are prefixed with "HTTP_" -> so hasHeader("Host") checks for the CGI header/variable HTTP_HOST to exist More...
 
bool hasCgiHeader (const QString &) const
 returns true if the given low-level variable/header exists More...
 
QByteArray header (const QString &) const
 returns the value of the given HTTP level header More...
 
QByteArray cgiHeader (const QString &) const
 returns the value of the given low-level variable/header More...
 
QByteArray bodyData () const
 returns the request body, or an empty array if there was none More...
 
bool isValid () const
 returns true if this is a valid SCGI request More...
 
QByteArray dump () const
 dumps the request in a human readable format More...
 
QString pathInfo () const
 returns the path (Request-Uri) that has been requested by the client More...
 
QString hostInfo () const
 returns the (virtual) Host that the client wants to access More...
 

Protected Member Functions

 WServerRequest (const QByteArray &)
 used by WServerReceiver to instantiate requests More...
 
void setBody (const QByteArray &)
 

Friends

class WServer
 
class WServerReceiver
 

Detailed Description

Encapsulates the request as it comes in via (S)CGI.

Constructor & Destructor Documentation

WServerRequest::WServerRequest ( )

instantiates an empty request

WServerRequest::WServerRequest ( const WServerRequest r)

copies a request

WServerRequest::WServerRequest ( const QByteArray &  b)
protected

used by WServerReceiver to instantiate requests

Member Function Documentation

QByteArray WServerRequest::bodyData ( ) const

returns the request body, or an empty array if there was none

QByteArray WServerRequest::cgiHeader ( const QString &  h) const

returns the value of the given low-level variable/header

QByteArray WServerRequest::dump ( ) const

dumps the request in a human readable format

bool WServerRequest::hasCgiHeader ( const QString &  h) const

returns true if the given low-level variable/header exists

bool WServerRequest::hasHeader ( const QString &  h) const

checks HTTP level header for its existence, in (S)CGI these are prefixed with "HTTP_" -> so hasHeader("Host") checks for the CGI header/variable HTTP_HOST to exist

QByteArray WServerRequest::header ( const QString &  h) const

returns the value of the given HTTP level header

QString WServerRequest::hostInfo ( ) const

returns the (virtual) Host that the client wants to access

bool WServerRequest::isValid ( ) const

returns true if this is a valid SCGI request

WServerRequest & WServerRequest::operator= ( const WServerRequest r)

copies a request

QString WServerRequest::pathInfo ( ) const

returns the path (Request-Uri) that has been requested by the client

void WServerRequest::setBody ( const QByteArray &  b)
protected

Friends And Related Function Documentation

friend class WServer
friend
friend class WServerReceiver
friend

The documentation for this class was generated from the following files: