Changeset 545
- Timestamp:
- 08/21/05 15:21:29
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/test/test_core.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r531 r545 330 330 331 331 # build a paramMap dictionary from queryString 332 pm = cgi.parse_qs(req.queryString, keep_blank_values=True) 333 for key, val in pm.items(): 334 if len(val) == 1: 335 pm[key] = val[0] 332 if re.match(r"[0-9]+,[0-9]+", req.queryString): 333 # Server-side image map. Map the coords to 'x' and 'y' 334 # (like CGI::Request does). 335 pm = req.queryString.split(",") 336 pm = {'x': int(pm[0]), 'y': int(pm[1])} 337 else: 338 pm = cgi.parse_qs(req.queryString, keep_blank_values=True) 339 for key, val in pm.items(): 340 if len(val) == 1: 341 pm[key] = val[0] 336 342 req.paramMap = pm 337 343 trunk/cherrypy/test/test_core.py
r534 r545 63 63 def index(self, thing): 64 64 return thing 65 66 def ismap(self, x, y): 67 return "Coordinates: %s, %s" % (x, y) 65 68 66 69 … … 284 287 self.getPage("/params/?thing=a&thing=b&thing=c") 285 288 self.assertBody('abc') 289 290 # Test coordinates sent by <img ismap> 291 self.getPage("/params/ismap?223,114") 292 self.assertBody("Coordinates: 223, 114") 286 293 287 294 def testStatus(self):

