>Number: 2963
>Category: mod_jserv
>Synopsis: Error parsing initArgs when whitespaces are present
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sun Sep 6 11:40:00 PDT 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3.1
>Environment:
FreeBSD 2.2.6, JDK1.1.6, JSDK 2.0, JServ 1.0beta snapshot 980906
>Description:
If you have an initArgs line like this, with several initial arguments
separated by commas AND white spaces:
xxx.xxx.initArgs=name1=value1, name2=value2, name3=value3
When you later do a "getInitParameter" for "name2" or "name3" you won't get it,
because it has the parameters mapped with names " name2" and " name3".
>How-To-Repeat:
>Fix:
This patch for org.apache.jserv.JServServletManager.java:
*** JServServletManager.java.orig Mon Aug 31 06:39:24 1998
--- JServServletManager.java Sun Sep 6 20:20:18 1998
***************
*** 644,650 ****
state = VALUE;
break;
case ',':
! initargs.put( name.toString(), value.toString()
);
name.setLength(0);
value.setLength(0);
state = NAME;
--- 644,651 ----
state = VALUE;
break;
case ',':
! initargs.put( name.toString().trim(),
! value.toString().trim() );
name.setLength(0);
value.setLength(0);
state = NAME;
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]