version 1.1.2.1, 2001/08/17 23:23:20
|
version 1.9, 2002/05/24 01:36:59
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%////////-*-c++-*-//////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, | // Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, |
// The Open Group, Tivoli Systems | // The Open Group, Tivoli Systems |
|
|
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: |
// Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com) |
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Message.h> | #include <Pegasus/Common/Message.h> |
#include <Pegasus/Common/Array.h> | #include <Pegasus/Common/Array.h> |
#include <Pegasus/Common/Monitor.h> |
#include <Pegasus/Common/AuthenticationInfo.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
typedef Pair<String, String> HTTPHeader; |
|
|
|
#define PEGASUS_ARRAY_T HTTPHeader |
|
#include <Pegasus/Common/ArrayInter.h> |
|
#undef PEGASUS_ARRAY_T |
|
|
/** This message is sent from a connection to its output queue when | /** This message is sent from a connection to its output queue when |
a complete HTTP message is received. | a complete HTTP message is received. |
*/ | */ |
|
|
{ | { |
public: | public: |
| |
HTTPMessage(const Array<Sint8>& message_, Uint32 returnQueueId_ = 0); |
typedef Message Base; |
| |
Array<Sint8> message; |
HTTPMessage(const Array<Sint8>& message_, Uint32 queueId_ = 0); |
Uint32 returnQueueId; |
|
| |
typedef Pair<String, String> HTTPHeader; |
HTTPMessage(HTTPMessage & msg); |
|
|
|
Array<Sint8> message; |
|
Uint32 queueId; |
|
AuthenticationInfo* authInfo; |
| |
void parse( | void parse( |
String& startLine, | String& startLine, |
Array<HTTPHeader>& headers, | Array<HTTPHeader>& headers, |
Sint8*& content, |
|
Uint32& contentLength) const; | Uint32& contentLength) const; |
| |
void print(PEGASUS_STD(ostream)& os) const; |
void printAll(PEGASUS_STD(ostream)& os) const; |
|
|
|
static Boolean lookupHeader( |
|
Array<HTTPHeader>& headers, |
|
const String& fieldName, |
|
String& fieldValue, |
|
Boolean allowNamespacePrefix = false); |
|
|
|
static Boolean parseRequestLine( |
|
const String& startLine, |
|
String& methodName, |
|
String& requestUri, |
|
String& httpVersion); |
|
|
|
static Boolean parseStatusLine( |
|
const String& statusLine, |
|
String& httpVersion, |
|
Uint32& statusCode, |
|
String& reasonPhrase); |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |