Changeset 323
- Timestamp:
- 06/16/05 08:03:39
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (2 diffs)
- trunk/cherrypy/lib/filter/decodingfilter.py (modified) (1 diff)
- trunk/cherrypy/test/helper.py (modified) (1 diff)
- trunk/cherrypy/tutorial/tut11_file_upload.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r321 r323 120 120 cpg.request.remoteHost = remoteHost 121 121 cpg.request.paramList = [] # Only used for Xml-Rpc 122 cpg.request.filenameMap = {}123 cpg.request.fileTypeMap = {}124 122 cpg.request.headerMap = {} 125 123 cpg.request.requestLine = requestLine … … 242 240 if isinstance(valueList, list): 243 241 cpg.request.paramMap[key] = [] 244 cpg.request.filenameMap[key] = []245 cpg.request.fileTypeMap[key] = []246 242 for item in valueList: 247 cpg.request.paramMap[key].append(item.value) 248 cpg.request.filenameMap[key].append(item.filename) 249 cpg.request.fileTypeMap[key].append(item.type) 243 cpg.request.paramMap[key].append(item) 250 244 else: 251 cpg.request.paramMap[key] = valueList.value 252 cpg.request.filenameMap[key] = valueList.filename 253 cpg.request.fileTypeMap[key] = valueList.type 245 cpg.request.paramMap[key] = valueList 254 246 255 247 trunk/cherrypy/lib/filter/decodingfilter.py
r230 r323 43 43 enc = cpg.config.get('decodingFilter.encoding', 'utf-8') 44 44 for key, value in cpg.request.paramMap.items(): 45 if cpg.request.filenameMap.get(key):45 if hasattr(value, 'file'): 46 46 # This is a file being uploaded: skip it 47 47 continue trunk/cherrypy/test/helper.py
r320 r323 56 56 if not port_is_free(): 57 57 raise IOError("Port %s is in use; perhaps the previous server " 58 "did not shut down properly." % port)58 "did not shut down properly." % PORT) 59 59 t = threading.Thread(target=cpg.server.start, args=(False, serverClass)) 60 60 t.start() trunk/cherrypy/tutorial/tut11_file_upload.py
r319 r323 23 23 myFile mime-type: %s 24 24 </body></html> 25 """ % (len(myFile ),26 cpg.request.filenameMap['myFile'],27 cpg.request.fileTypeMap['myFile'])25 """ % (len(myFile.value), 26 myFile.filename, 27 myFile.type) 28 28 upload.exposed = True 29 29

