1 karl 1.24 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.18 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.14 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.18 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.20 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.24 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.2 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.11 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
18 mike 1.2 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
20 //
|
21 kumpf 1.11 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.2 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
24 kumpf 1.11 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
27 mike 1.2 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_HTTPMessage_h
35 #define Pegasus_HTTPMessage_h
36
37 #include <iostream>
38 #include <Pegasus/Common/Config.h>
39 #include <Pegasus/Common/MessageQueue.h>
40 #include <Pegasus/Common/Pair.h>
41 #include <Pegasus/Common/String.h>
42 #include <Pegasus/Common/Message.h>
|
43 kumpf 1.13 #include <Pegasus/Common/ArrayInternal.h>
|
44 mike 1.2 #include <Pegasus/Common/AuthenticationInfo.h>
|
45 kumpf 1.12 #include <Pegasus/Common/Linkage.h>
|
46 kumpf 1.23 #include <Pegasus/Common/AcceptLanguageList.h>
47 #include <Pegasus/Common/ContentLanguageList.h>
|
48 mike 1.22 #include <Pegasus/Common/Buffer.h>
|
49 mike 1.2
50 PEGASUS_NAMESPACE_BEGIN
51
52 typedef Pair<String, String> HTTPHeader;
53
54 /** This message is sent from a connection to its output queue when
55 a complete HTTP message is received.
56 */
57 class PEGASUS_COMMON_LINKAGE HTTPMessage : public Message
58 {
|
59 mday 1.3 public:
60
61 typedef Message Base;
62
|
63 mike 1.22 HTTPMessage(const Buffer& message_, Uint32 queueId_ = 0,
|
64 brian.campbell 1.16 const CIMException *cimException_ = 0);
|
65 mday 1.3
|
66 se.gupta 1.17 HTTPMessage(const HTTPMessage & msg);
|
67 brian.campbell 1.16
|
68 mike 1.22 Buffer message;
|
69 mday 1.3 Uint32 queueId;
|
70 kumpf 1.25 String ipAddress;
|
71 mday 1.3 AuthenticationInfo* authInfo;
|
72 kumpf 1.23 AcceptLanguageList acceptLanguages;
73 ContentLanguageList contentLanguages;
|
74 humberto 1.15 Boolean acceptLanguagesDecoded;
75 Boolean contentLanguagesDecoded;
|
76 brian.campbell 1.16 CIMException cimException;
|
77 mday 1.3
78 void parse(
79 String& startLine,
80 Array<HTTPHeader>& headers,
81 Uint32& contentLength) const;
82
|
83 joyce.j 1.21 #ifdef PEGASUS_DEBUG
84 void printAll(PEGASUS_STD(ostream)& os) const;
85 #endif
|
86 mday 1.3
|
87 brian.campbell 1.16 static void lookupHeaderPrefix(
88 Array<HTTPHeader>& headers,
89 const String& fieldName,
90 String& prefix);
91
|
92 mday 1.3 static Boolean lookupHeader(
93 Array<HTTPHeader>& headers,
94 const String& fieldName,
95 String& fieldValue,
|
96 kumpf 1.8 Boolean allowNamespacePrefix = false);
|
97 mday 1.3
98 static Boolean parseRequestLine(
99 const String& startLine,
100 String& methodName,
101 String& requestUri,
102 String& httpVersion);
|
103 kumpf 1.4
104 static Boolean parseStatusLine(
105 const String& statusLine,
106 String& httpVersion,
107 Uint32& statusCode,
108 String& reasonPhrase);
109 };
|
110 kumpf 1.5
111 PEGASUS_NAMESPACE_END
|
112 mike 1.2
113 #endif /* Pegasus_HTTPMessage_h */
|