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 // Author: Mike Brasher (mbrasher@bmc.com)
33 //
|
34 kumpf 1.4 // Modified By: Nag Boranna, Hewlett-Packard Company (nagaraja_boranna@hp.com)
35 // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
|
36 brian.campbell 1.16 // Brian G. Campbell, EMC (campbell_brian@emc.com) - PEP140/phase1
|
37 se.gupta 1.17 // Seema Gupta (gseema@in.ibm.com) for Bug#1096
|
38 david.dillard 1.19 // David Dillard, VERITAS Software Corp. (david.dillard@veritas.com)
|
39 mike 1.2 //
40 //%/////////////////////////////////////////////////////////////////////////////
41
42 #ifndef Pegasus_HTTPMessage_h
43 #define Pegasus_HTTPMessage_h
44
45 #include <iostream>
46 #include <Pegasus/Common/Config.h>
47 #include <Pegasus/Common/MessageQueue.h>
48 #include <Pegasus/Common/Pair.h>
49 #include <Pegasus/Common/String.h>
50 #include <Pegasus/Common/Message.h>
|
51 kumpf 1.13 #include <Pegasus/Common/ArrayInternal.h>
|
52 mike 1.2 #include <Pegasus/Common/AuthenticationInfo.h>
|
53 kumpf 1.12 #include <Pegasus/Common/Linkage.h>
|
54 kumpf 1.23 #include <Pegasus/Common/AcceptLanguageList.h>
55 #include <Pegasus/Common/ContentLanguageList.h>
|
56 mike 1.22 #include <Pegasus/Common/Buffer.h>
|
57 mike 1.2
58 PEGASUS_NAMESPACE_BEGIN
59
60 typedef Pair<String, String> HTTPHeader;
61
62 /** This message is sent from a connection to its output queue when
63 a complete HTTP message is received.
64 */
65 class PEGASUS_COMMON_LINKAGE HTTPMessage : public Message
66 {
|
67 mday 1.3 public:
68
69 typedef Message Base;
70
|
71 mike 1.22 HTTPMessage(const Buffer& message_, Uint32 queueId_ = 0,
|
72 brian.campbell 1.16 const CIMException *cimException_ = 0);
|
73 mday 1.3
|
74 se.gupta 1.17 HTTPMessage(const HTTPMessage & msg);
|
75 brian.campbell 1.16
|
76 mike 1.22 Buffer message;
|
77 mday 1.3 Uint32 queueId;
78 AuthenticationInfo* authInfo;
|
79 kumpf 1.23 AcceptLanguageList acceptLanguages;
80 ContentLanguageList contentLanguages;
|
81 humberto 1.15 Boolean acceptLanguagesDecoded;
82 Boolean contentLanguagesDecoded;
|
83 brian.campbell 1.16 CIMException cimException;
|
84 mday 1.3
85 void parse(
86 String& startLine,
87 Array<HTTPHeader>& headers,
88 Uint32& contentLength) const;
89
|
90 joyce.j 1.21 #ifdef PEGASUS_DEBUG
91 void printAll(PEGASUS_STD(ostream)& os) const;
92 #endif
|
93 mday 1.3
|
94 brian.campbell 1.16 static void lookupHeaderPrefix(
95 Array<HTTPHeader>& headers,
96 const String& fieldName,
97 String& prefix);
98
|
99 mday 1.3 static Boolean lookupHeader(
100 Array<HTTPHeader>& headers,
101 const String& fieldName,
102 String& fieldValue,
|
103 kumpf 1.8 Boolean allowNamespacePrefix = false);
|
104 mday 1.3
105 static Boolean parseRequestLine(
106 const String& startLine,
107 String& methodName,
108 String& requestUri,
109 String& httpVersion);
|
110 kumpf 1.4
111 static Boolean parseStatusLine(
112 const String& statusLine,
113 String& httpVersion,
114 Uint32& statusCode,
115 String& reasonPhrase);
116 };
|
117 kumpf 1.5
118 PEGASUS_NAMESPACE_END
|
119 mike 1.2
120 #endif /* Pegasus_HTTPMessage_h */
|