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 mike 1.2 //
35 //%/////////////////////////////////////////////////////////////////////////////
36
37 #ifndef Pegasus_HTTPMessage_h
38 #define Pegasus_HTTPMessage_h
39
40 #include <iostream>
41 #include <Pegasus/Common/Config.h>
42 #include <Pegasus/Common/MessageQueue.h>
43 #include <Pegasus/Common/Pair.h>
44 #include <Pegasus/Common/String.h>
45 #include <Pegasus/Common/Message.h>
|
46 kumpf 1.13 #include <Pegasus/Common/ArrayInternal.h>
|
47 mike 1.2 #include <Pegasus/Common/AuthenticationInfo.h>
|
48 kumpf 1.12 #include <Pegasus/Common/Linkage.h>
|
49 humberto 1.15 #include <Pegasus/Common/AcceptLanguages.h>
50 #include <Pegasus/Common/ContentLanguages.h>
|
51 mike 1.2
52 PEGASUS_NAMESPACE_BEGIN
53
54 typedef Pair<String, String> HTTPHeader;
55
56 /** This message is sent from a connection to its output queue when
57 a complete HTTP message is received.
58 */
59 class PEGASUS_COMMON_LINKAGE HTTPMessage : public Message
60 {
|
61 mday 1.3 public:
62
63 typedef Message Base;
64
|
65 brian.campbell 1.16 HTTPMessage(const Array<Sint8>& message_, Uint32 queueId_ = 0,
66 const CIMException *cimException_ = 0);
|
67 mday 1.3
|
68 se.gupta 1.17 HTTPMessage(const HTTPMessage & msg);
|
69 brian.campbell 1.16
|
70 mday 1.3 Array<Sint8> message;
71 Uint32 queueId;
72 AuthenticationInfo* authInfo;
|
73 humberto 1.15 AcceptLanguages acceptLanguages;
74 ContentLanguages contentLanguages;
75 Boolean acceptLanguagesDecoded;
76 Boolean contentLanguagesDecoded;
|
77 brian.campbell 1.16 CIMException cimException;
|
78 mday 1.3
79 void parse(
80 String& startLine,
81 Array<HTTPHeader>& headers,
82 Uint32& contentLength) const;
83
84 void printAll(PEGASUS_STD(ostream)& os) const;
85
|
86 brian.campbell 1.16 static void lookupHeaderPrefix(
87 Array<HTTPHeader>& headers,
88 const String& fieldName,
89 String& prefix);
90
|
91 mday 1.3 static Boolean lookupHeader(
92 Array<HTTPHeader>& headers,
93 const String& fieldName,
94 String& fieldValue,
|
95 kumpf 1.8 Boolean allowNamespacePrefix = false);
|
96 mday 1.3
97 static Boolean parseRequestLine(
98 const String& startLine,
99 String& methodName,
100 String& requestUri,
101 String& httpVersion);
|
102 kumpf 1.4
103 static Boolean parseStatusLine(
104 const String& statusLine,
105 String& httpVersion,
106 Uint32& statusCode,
107 String& reasonPhrase);
108 };
|
109 kumpf 1.5
110 PEGASUS_NAMESPACE_END
|
111 mike 1.2
112 #endif /* Pegasus_HTTPMessage_h */
|