[Bug 110] New: AccessEvent is missing getters for RequestParameters.

http://bugzilla.qos.ch/show_bug.cgi?id=110 Summary: AccessEvent is missing getters for RequestParameters. Product: logback-access Version: unspecified Platform: All OS/Version: All Status: NEW Severity: major Priority: P1 Component: Other AssignedTo: logback-dev@qos.ch ReportedBy: joern@huxhorn.de Please provide the following method in AccessEvent: public Map<String, Object> getRequestParameterMap() { if (requestParameterMap == null) { buildRequestParameterMap(); } return requestParameterMap; } requestParameterMap is initialized but there is no method to access it or it's contents. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 ------- Comment #1 from joern@huxhorn.de 2007-10-24 15:02 ------- Workaround: /** * Hack ;) * @param event * @return request parameter map */ public Map<String,Object> getRequestParameterMap(AccessEvent event) { try { Field field=AccessEvent.class.getDeclaredField("requestParameterMap"); field.setAccessible(true); Object rpm=field.get(event); if(rpm instanceof Map) { return (Map<String, Object>)rpm; } } catch (NoSuchFieldException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return null; } -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 ------- Comment #2 from joern@huxhorn.de 2007-10-25 11:38 ------- Created an attachment (id=13) --> (http://bugzilla.qos.ch/attachment.cgi?id=13&action=view) requestParameterMap changed from Map<String,Object> to Map<String,String[]>. The current implementation of buildRequestParameterMap() is ignoring multiple parameter values! Instead of using httpRequest.getParameter it should either use httpRequest.getParameterValues or use httpRequest.getParameterMap() as I do in my patch. The type of requestParameterMap should IMHO be changed to Map<String,String[]> for consistency reasons. It's not used anywhere so this change shouldn't be a big problem. This patch does also include the changes of the http://bugzilla.qos.ch/show_bug.cgi?id=109 patch. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 joern@huxhorn.de changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical Summary|AccessEvent is missing |AccessEvent is missing |getters for |getters for |RequestParameters. |RequestParameters. Ignores | |multiple parameter values. ------- Comment #3 from joern@huxhorn.de 2007-10-25 11:41 ------- I increased the severity to critical because of the lost parameter values... -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from noreply.ceki@qos.ch 2008-01-23 13:08 ------- Hello Joern, I see no objections to adding a getRequestParameterMap method as you propose. I have also changed requestParameterMap field from Map<String,Object> to Map<String,String[]>. These changes are reflected in revision 1605: http://svn.qos.ch/viewvc?view=rev&revision=1605 I am also looking into bug 109. Joern, could you please close this bug if the fix works for you? -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 ------- Comment #5 from joern@huxhorn.de 2008-01-23 15:27 ------- Hi Ceki, I'd like to check the changes in my code but it would crash with NPE's due to bug #109. I checked the changes and they look good, though. I'll close this bug when I'm able to verify them - if this is ok with you. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 ------- Comment #6 from noreply.ceki@qos.ch 2008-01-25 12:28 ------- (In reply to comment #5)
Hi Ceki, I'd like to check the changes in my code but it would crash with NPE's due to bug #109. I checked the changes and they look good, though.
I'll close this bug when I'm able to verify them - if this is ok with you.
That's fine. I've just checked in a fix for bug 109. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=110 joern@huxhorn.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED ------- Comment #7 from joern@huxhorn.de 2008-01-25 23:43 ------- Works. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch