Issue1507

classification
Title: modjy crashes if any query string parameters are not set with '='
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, nathanh
Priority: Keywords:

Created on 2009-11-23.23:49:58 by nathanh, last changed 2009-11-29.16:15:00 by amak.

Messages
msg5322 (view) Author: Nathan Hamblen (nathanh) Date: 2009-11-23.23:49:57
On a request such as "/path?key" modjy throws a ValueError from line 42 of 
modjy_publish, which assumes that any portion of the query string between 
ampersands will contain an equals character:
http://fisheye3.atlassian.com/browse/jython/trunk/jython/Lib/modjy/modjy_p
ublish.py?r=6842#l47

Traceback (most recent call last):
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy.py', line 76, in service
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy.py', line 76, in service
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy.py', line 92, in 
dispatch_to_application
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy_publish.py', line 63, in get_app_object
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy_publish.py', line 108, in 
get_app_object_old_style
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/modjy_publish.py', line 47, in map_uri
ValueError: need more than 1 value to unpack
msg5327 (view) Author: Alan Kennedy (amak) Date: 2009-11-29.16:14:59
This only occurs when the "callable_query_string" app invocation model
is used.

Nonetheless, modjy was definitely crashing in this scenario.

I have checked in a fix at r6951. This fixes the error, making handling
of errors in callable_query_string configurations more strict. The
checkin includes multiple unit-tests.
History
Date User Action Args
2009-11-29 16:15:00amaksetstatus: open -> closed
resolution: fixed
messages: + msg5327
2009-11-28 14:34:55amaksetassignee: amak
nosy: + amak
2009-11-23 23:49:58nathanhcreate