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