https://issues.apache.org/bugzilla/show_bug.cgi?id=49964

           Summary: Allow parsing of application/x-www-form-urlencoded
                    request body into getParameter methods for PUT
                    requests
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Connectors
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: ch...@christopherschultz.net


(Apologies for the awkward summary, but I wanted this bug to be easily findable
in bugzilla)

A couple of questions have been raised on various lists about why Tomcat
doesn't support auto-parsing of PUT requests, and the reason is clear: the
servlet spec doesn't require it. On the other hand, it seems that there are
enough users who would love to have this capability, and it doesn't seem to be
too difficult to implement, so why not go ahead and do it?

My proposal is this (and I'm prepared to write the patches myself):

1. A new configuration attribute on the <Connector> element:
"parseBodyRequestParametersMethods" (suggestions for a better name are
welcome). The default value for this setting is "POST" which retains strict
servlet spec compliance.

2. Change catalina.connector.Request.parseParameters method to allow any method
mentioned in the above configuration attribute to undergo request body
conversion into request parameters. All other existing requirements remain in
place: the request body must be application/x-www-form-urlencoded, must fit
into maxPostSize, etc.

One question I have about this implementation: how should it behave under
org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true? I believe that
org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true should take precedence over
this setting, disable it's use, and issue a warning/error during startup when
they conflict.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to