Changeset 51682
- Timestamp:
- 04/26/07 17:58:24 (3 years ago)
- Files:
-
- funkload/trunk/CHANGES.txt (modified) (2 diffs)
- funkload/trunk/funkload/FunkLoadTestCase.py (modified) (2 diffs)
- funkload/trunk/funkload/PatchWebunit.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
funkload/trunk/CHANGES.txt
r51681 r51682 28 28 29 29 * fix: # 1834_: multiple redirects not handled properly (jehiah patch). 30 31 * fix: # 1837_: post() is sent as GET when no params defined. 30 32 31 33 … … 492 494 .. _1284: http://svn.nuxeo.org/trac/pub/ticket/1284 493 495 .. _1300: http://svn.nuxeo.org/trac/pub/ticket/1300 496 .. _1834: http://svn.nuxeo.org/trac/pub/ticket/1834 497 .. _1837: http://svn.nuxeo.org/trac/pub/ticket/1837 494 498 .. _Plone: http://plone.org/ 495 499 funkload/trunk/funkload/FunkLoadTestCase.py
r51681 r51682 167 167 def _connect(self, url, params, ok_codes, rtype, description): 168 168 """Handle fetching, logging, errors and history.""" 169 if params is None and rtype == 'post': 170 # enable empty post 171 params = [] 169 172 t_start = time.time() 170 173 try: … … 246 249 if method == 'get' and params: 247 250 url = url_in + '?' + urlencode(params) 251 else: 252 url = url_in 253 if method == 'get': 248 254 params = None 249 else:250 url = url_in251 255 252 256 if method == 'get': funkload/trunk/funkload/PatchWebunit.py
r51277 r51682 247 247 248 248 params = None 249 if postdata :249 if postdata is not None: 250 250 if webproxy: 251 251 h.putrequest('POST', "http://%s%s" % (host_header, url)) … … 254 254 h.putrequest('POST', url) 255 255 is_multipart = False 256 for field, value in postdata: 257 if isinstance(value, Upload): 258 # Post with a data file requires multipart mimeencode 259 is_multipart = True 256 if postdata: 257 for field, value in postdata: 258 if isinstance(value, Upload): 259 # Post with a data file requires multipart mimeencode 260 is_multipart = True 260 261 if is_multipart: 261 262 params = mimeEncode(postdata)
