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