[Zope-CVS] CVS: Packages/FunctionalTests/FunctionalTests -
ScenarioGenerator.py:1.5.2.2
Karl Anderson
cvs-admin at zope.org
Fri Nov 7 15:28:47 EST 2003
Update of /cvs-repository/Packages/FunctionalTests/FunctionalTests
In directory cvs.zope.org:/tmp/cvs-serv13923
Modified Files:
Tag: kra-misc-branch
ScenarioGenerator.py
Log Message:
ScenarioGenerator.CONTENT_HANDLERS: correct mis-spelling in this dict
ScenarioGenerator.processFile(): parse content_type header properly
=== Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py 1.5.2.1 => 1.5.2.2 ===
--- Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py:1.5.2.1 Mon Nov 3 21:20:27 2003
+++ Packages/FunctionalTests/FunctionalTests/ScenarioGenerator.py Fri Nov 7 15:28:46 2003
@@ -307,13 +307,13 @@
def _handleFormdata( self, data ):
"""
Emit Field_## values for data, which is encoded using
- 'multipart/formdata'.
+ 'multipart/form-data'.
"""
raise NotImplemented # TODO: Implement me!
CONTENT_HANDLERS =\
{ 'application/x-www-form-urlencoded' : _handleURLEncoded
- , 'multipart/formdata' : _handleFormdata
+ , 'multipart/form-data' : _handleFormdata
}
def _addExcludePattern( self, pattern ):
@@ -430,6 +430,12 @@
content_type = parms[ 'content_type' ]
if content_type is not None:
+ content_type = content_type.split( ';' )
+ if len(content_type) > 1:
+ content_parm = content_type[1].strip()
+ else:
+ content_parm = None
+ content_type = content_type[0].strip()
handler = self.CONTENT_HANDLERS.get( content_type, None )
if handler is None:
More information about the Zope-CVS
mailing list