Re: Barracuda: Bug in HttpServletRequestWrapper.getParameterMap()?

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
I haven't looked into the wrapper stuff so much, but now that I think about 
it, why the heck are we overriding methods where we aren't adding any new 
functionality to?  As I understand it, the wrapper is only there to provide 
the capability to add some multipart request handling functionalty to 
Barracuda.  Do we really need to override getParameterMap() for that....or 
any other method not specifically modifying behavior for a multipart request?

I suppose a short-term solution would be to add Sergey's code to to fix 
getParameterMap() but we should think about why we are doing it in the 
first place and do the right thing here.  Am I missing something?

Jake

At 12:41 PM 12/5/2002 +0100, you wrote:
>Seems like there is a bug in the
>HttpServletRequestWrapper.getParameterMap() method.
>According to the specification, this method suppose to return a map
>where values are String[] (arrays). But current implementation returning
>a map with just String values instead.
>
>Following quick fix worked for me:
>
>     public Map getParameterMap()
>     {
>         Map paramMap = new HashMap();
>
>         for (Enumeration e = getParameterNames(); e.hasMoreElements();)
>{
>             String name = (String)e.nextElement();
>             paramMap.put(name, getParameterValues(name));
>         }
>
>         return paramMap;
>     }
>
>
>regards,
>Sergey Udovenko
>
>This message is for the named person's use only. It may contain
>confidential, proprietary or legally privileged information. No
>confidentiality or privilege is waived or lost by any mistransmission.
>If you receive this message in error, please notify the sender urgently
>and then immediately delete the message and any copies of it from your
>system. Please also immediately destroy any hardcopies of the message.
>You must not, directly or indirectly, use, disclose, distribute, print,
>or copy any part of this message if you are not the intended recipient.
>The sender's company reserves the right to monitor all e-mail
>communications through their networks. Any views expressed in this
>message are those of the individual sender, except where the message
>states otherwise and the sender is authorised to state them to be the
>views of the sender's company.
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://www.enhydra.org/mailman/listinfo.cgi/barracuda
>FAQ - http://www.jguru.com/faq/Barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.