Title: modjy crashes if any query string parameters are not set with '='
Type: Severity: normal
Components: Library Versions:
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.

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:

Traceback (most recent call last):
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', line 76, in service
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', line 76, in service
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', line 92, in 
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', line 63, in get_app_object
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', line 108, in 
  File '/usr/local/tomcat/webapps/myapp/WEB-
INF/lib/jython.jar/Lib/modjy/', 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.
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