summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumpf <kumpf>2006-04-11 18:49:27 +0000
committerkumpf <kumpf>2006-04-11 18:49:27 +0000
commitf67b4704b9beaca0e3b401bd446d1a5f06ae9a62 (patch)
treee351cfaeae49c7e0d52fbec15f31528bf4a76c80 /test
parentb3a6a15c8d043bbccd19446f4d077257c3efeade (diff)
downloadtog-pegasus-f67b4704b9beaca0e3b401bd446d1a5f06ae9a62.zip
tog-pegasus-f67b4704b9beaca0e3b401bd446d1a5f06ae9a62.tar.gz
tog-pegasus-f67b4704b9beaca0e3b401bd446d1a5f06ae9a62.tar.xz
BUG#: 4938
TITLE: CIM Server should reject duplicate HTTP headers DESCRIPTION: Concatenate the values of duplicate HTTP headers using a comma separator.
Diffstat (limited to 'test')
-rw-r--r--test/wetest/static/Headers/BadTransferEncodingValue01.xml32
-rw-r--r--test/wetest/static/Headers/BadTransferEncodingValue01rspgood.xml3
-rw-r--r--test/wetest/static/Headers/DuplicateCIMOperationTag01.xml32
-rw-r--r--test/wetest/static/Headers/DuplicateCIMOperationTag01rspgood.xml4
-rw-r--r--test/wetest/static/Headers/DuplicateContentLengthTag01.xml32
-rw-r--r--test/wetest/static/Headers/DuplicateContentLengthTag01rspgood.xml3
-rw-r--r--test/wetest/static/Headers/DuplicateTransferEncodingTag01.xml34
-rw-r--r--test/wetest/static/Headers/DuplicateTransferEncodingTag01rspgood.xml3
-rw-r--r--test/wetest/static/Headers/Makefile4
9 files changed, 147 insertions, 0 deletions
diff --git a/test/wetest/static/Headers/BadTransferEncodingValue01.xml b/test/wetest/static/Headers/BadTransferEncodingValue01.xml
new file mode 100644
index 0000000..b319849
--- /dev/null
+++ b/test/wetest/static/Headers/BadTransferEncodingValue01.xml
@@ -0,0 +1,32 @@
+M-POST /cimom HTTP/1.1
+Host: testsystem
+Content-Type: application/xml; charset="utf-8"
+Content-Length: 845
+Transfer-Encoding: unknown
+Man: http://www.dmtf.org/cim/mapping/http/v1.0;ns=23
+23-CIMProtocolVersion: 1.0
+23-CIMOperation: MethodCall
+23-CIMMethod: PositionAtRecord
+23-CIMObject: root/cimv2:CIM_MessageLog.CreationClassName="CIM_MessageLog"
+
+<?xml version="1.0" encoding="utf-8" ?>
+ <CIM CIMVERSION="2.0" DTDVERSION="2.0">
+ <MESSAGE ID="87872" PROTOCOLVERSION="1.0">
+ <SIMPLEREQ>
+ <METHODCALL NAME="PositionAtRecord">
+ <LOCALINSTANCEPATH>
+ <LOCALNAMESPACEPATH>
+ <NAMESPACE NAME="root"/>
+ <NAMESPACE NAME="cimv2"/>
+ </LOCALNAMESPACEPATH>
+ <INSTANCENAME CLASSNAME="CIM_MessageLog">
+ <KEYBINDING NAME="CreationClassName"><KEYVALUE>CIM_MessageLog</KEYVALUE></KEYBINDING>
+ </INSTANCENAME>
+ </LOCALINSTANCEPATH>
+ <PARAMVALUE NAME="IterationIdentifier" PARAMTYPE="string"><VALUE>123</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="MoveAbsolute" PARAMTYPE="boolean"><VALUE>TRUE</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="RecordNumber" PARAMTYPE="sint64"><VALUE>444</VALUE></PARAMVALUE>
+ </METHODCALL>
+ </SIMPLEREQ>
+ </MESSAGE>
+ </CIM>
diff --git a/test/wetest/static/Headers/BadTransferEncodingValue01rspgood.xml b/test/wetest/static/Headers/BadTransferEncodingValue01rspgood.xml
new file mode 100644
index 0000000..24dd3c4
--- /dev/null
+++ b/test/wetest/static/Headers/BadTransferEncodingValue01rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 501 Not Implemented
+PGErrorDetail: unimplemented%20transfer-encoding%20value
+
diff --git a/test/wetest/static/Headers/DuplicateCIMOperationTag01.xml b/test/wetest/static/Headers/DuplicateCIMOperationTag01.xml
new file mode 100644
index 0000000..3780f80
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateCIMOperationTag01.xml
@@ -0,0 +1,32 @@
+M-POST /cimom HTTP/1.1
+Host: testsystem
+Content-Type: application/xml; charset="utf-8"
+Content-Length: 845
+Man: http://www.dmtf.org/cim/mapping/http/v1.0;ns=23
+23-CIMProtocolVersion: 1.0
+23-CIMOperation: MethodCall
+23-CIMMethod: PositionAtRecord
+23-CIMObject: root/cimv2:CIM_MessageLog.CreationClassName="CIM_MessageLog"
+23-CIMOperation: MethodCall
+
+<?xml version="1.0" encoding="utf-8" ?>
+ <CIM CIMVERSION="2.0" DTDVERSION="2.0">
+ <MESSAGE ID="87872" PROTOCOLVERSION="1.0">
+ <SIMPLEREQ>
+ <METHODCALL NAME="PositionAtRecord">
+ <LOCALINSTANCEPATH>
+ <LOCALNAMESPACEPATH>
+ <NAMESPACE NAME="root"/>
+ <NAMESPACE NAME="cimv2"/>
+ </LOCALNAMESPACEPATH>
+ <INSTANCENAME CLASSNAME="CIM_MessageLog">
+ <KEYBINDING NAME="CreationClassName"><KEYVALUE>CIM_MessageLog</KEYVALUE></KEYBINDING>
+ </INSTANCENAME>
+ </LOCALINSTANCEPATH>
+ <PARAMVALUE NAME="IterationIdentifier" PARAMTYPE="string"><VALUE>123</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="MoveAbsolute" PARAMTYPE="boolean"><VALUE>TRUE</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="RecordNumber" PARAMTYPE="sint64"><VALUE>444</VALUE></PARAMVALUE>
+ </METHODCALL>
+ </SIMPLEREQ>
+ </MESSAGE>
+ </CIM>
diff --git a/test/wetest/static/Headers/DuplicateCIMOperationTag01rspgood.xml b/test/wetest/static/Headers/DuplicateCIMOperationTag01rspgood.xml
new file mode 100644
index 0000000..44e2c9f
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateCIMOperationTag01rspgood.xml
@@ -0,0 +1,4 @@
+HTTP/1.1 400 Bad Request
+CIMError: unsupported-operation
+PGErrorDetail: CIMOperation%20value%20%22MethodCall%2C%20MethodCall%22%20is%20not%20supported.
+
diff --git a/test/wetest/static/Headers/DuplicateContentLengthTag01.xml b/test/wetest/static/Headers/DuplicateContentLengthTag01.xml
new file mode 100644
index 0000000..e783126
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateContentLengthTag01.xml
@@ -0,0 +1,32 @@
+M-POST /cimom HTTP/1.1
+Host: testsystem
+Content-Type: application/xml; charset="utf-8"
+Content-Length: 845
+Man: http://www.dmtf.org/cim/mapping/http/v1.0;ns=23
+Content-Length: 840
+23-CIMProtocolVersion: 1.0
+23-CIMOperation: MethodCall
+23-CIMMethod: PositionAtRecord
+23-CIMObject: root/cimv2:CIM_MessageLog.CreationClassName="CIM_MessageLog"
+
+<?xml version="1.0" encoding="utf-8" ?>
+ <CIM CIMVERSION="2.0" DTDVERSION="2.0">
+ <MESSAGE ID="87872" PROTOCOLVERSION="1.0">
+ <SIMPLEREQ>
+ <METHODCALL NAME="PositionAtRecord">
+ <LOCALINSTANCEPATH>
+ <LOCALNAMESPACEPATH>
+ <NAMESPACE NAME="root"/>
+ <NAMESPACE NAME="cimv2"/>
+ </LOCALNAMESPACEPATH>
+ <INSTANCENAME CLASSNAME="CIM_MessageLog">
+ <KEYBINDING NAME="CreationClassName"><KEYVALUE>CIM_MessageLog</KEYVALUE></KEYBINDING>
+ </INSTANCENAME>
+ </LOCALINSTANCEPATH>
+ <PARAMVALUE NAME="IterationIdentifier" PARAMTYPE="string"><VALUE>123</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="MoveAbsolute" PARAMTYPE="boolean"><VALUE>TRUE</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="RecordNumber" PARAMTYPE="sint64"><VALUE>444</VALUE></PARAMVALUE>
+ </METHODCALL>
+ </SIMPLEREQ>
+ </MESSAGE>
+ </CIM>
diff --git a/test/wetest/static/Headers/DuplicateContentLengthTag01rspgood.xml b/test/wetest/static/Headers/DuplicateContentLengthTag01rspgood.xml
new file mode 100644
index 0000000..84c6af6
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateContentLengthTag01rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 400 Bad Request
+PGErrorDetail: Invalid%20Content-Length%20header%20detected
+
diff --git a/test/wetest/static/Headers/DuplicateTransferEncodingTag01.xml b/test/wetest/static/Headers/DuplicateTransferEncodingTag01.xml
new file mode 100644
index 0000000..8ceb9fa
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateTransferEncodingTag01.xml
@@ -0,0 +1,34 @@
+M-POST /cimom HTTP/1.1
+Host: testsystem
+Content-Type: application/xml; charset="utf-8"
+Content-Length: 845
+Transfer-Encoding: identity
+Man: http://www.dmtf.org/cim/mapping/http/v1.0;ns=23
+Transfer-Encoding: identity
+23-CIMProtocolVersion: 1.0
+23-CIMOperation: MethodCall
+23-CIMMethod: PositionAtRecord
+23-CIMObject: root/cimv2:CIM_MessageLog.CreationClassName="CIM_MessageLog"
+23-CIMOperation: MethodCall
+
+<?xml version="1.0" encoding="utf-8" ?>
+ <CIM CIMVERSION="2.0" DTDVERSION="2.0">
+ <MESSAGE ID="87872" PROTOCOLVERSION="1.0">
+ <SIMPLEREQ>
+ <METHODCALL NAME="PositionAtRecord">
+ <LOCALINSTANCEPATH>
+ <LOCALNAMESPACEPATH>
+ <NAMESPACE NAME="root"/>
+ <NAMESPACE NAME="cimv2"/>
+ </LOCALNAMESPACEPATH>
+ <INSTANCENAME CLASSNAME="CIM_MessageLog">
+ <KEYBINDING NAME="CreationClassName"><KEYVALUE>CIM_MessageLog</KEYVALUE></KEYBINDING>
+ </INSTANCENAME>
+ </LOCALINSTANCEPATH>
+ <PARAMVALUE NAME="IterationIdentifier" PARAMTYPE="string"><VALUE>123</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="MoveAbsolute" PARAMTYPE="boolean"><VALUE>TRUE</VALUE></PARAMVALUE>
+ <PARAMVALUE NAME="RecordNumber" PARAMTYPE="sint64"><VALUE>444</VALUE></PARAMVALUE>
+ </METHODCALL>
+ </SIMPLEREQ>
+ </MESSAGE>
+ </CIM>
diff --git a/test/wetest/static/Headers/DuplicateTransferEncodingTag01rspgood.xml b/test/wetest/static/Headers/DuplicateTransferEncodingTag01rspgood.xml
new file mode 100644
index 0000000..24dd3c4
--- /dev/null
+++ b/test/wetest/static/Headers/DuplicateTransferEncodingTag01rspgood.xml
@@ -0,0 +1,3 @@
+HTTP/1.1 501 Not Implemented
+PGErrorDetail: unimplemented%20transfer-encoding%20value
+
diff --git a/test/wetest/static/Headers/Makefile b/test/wetest/static/Headers/Makefile
index 778f388..4809928 100644
--- a/test/wetest/static/Headers/Makefile
+++ b/test/wetest/static/Headers/Makefile
@@ -42,6 +42,10 @@ XMLSCRIPTS = \
BadCIMObjectValue04 \
BadCIMOperationValue01 \
BadCIMProtocolVersionValue01 \
+ BadTransferEncodingValue01 \
+ DuplicateCIMOperationTag01 \
+ DuplicateContentLengthTag01 \
+ DuplicateTransferEncodingTag01 \
ExtraCIMBatchTag01 \
ExtraCIMBatchTag02 \
MissingCIMBatchTag01 \