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