tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: svn commit: r1041892 - in /tomcat/trunk: java/org/apache/catalina/connector/ test/org/apache/catalina/connector/ webapps/docs/ webapps/docs/config/
Date Sun, 05 Dec 2010 19:12:11 GMT
Mark,

Thanks for the feedback. Is is better form to back-out these changes and
apply a new patch, or to simply make these changes to trunk and commit them?

Thanks,
-chris

On 12/5/2010 12:31 PM, Mark Thomas wrote:
> On 03/12/2010 16:07, schultz@apache.org wrote:
>> Author: schultz
>> Date: Fri Dec  3 16:07:50 2010
>> New Revision: 1041892
>>
>> URL: http://svn.apache.org/viewvc?rev=1041892&view=rev
>> Log:
>> Fixed bug 48692: Provide option to parse application/x-www-form-urlencoded PUT requests
> 
> Some minor comments in-line.
> 
>> +    protected HashSet parseBodyMethodsSet;
> This needs to use generics (same for subsequent use later on in the class).
> 
>> +    public String getParseBodyMethods()
>> +    {
>> +        return (this.parseBodyMethods);
>> +    }
> The Tomcat code style is to have brackets at the end of the previous line.
> 
>> +        if(methodSet.contains("TRACE"))
>> +            throw new IllegalArgumentException("TRACE method MUST NOT include an
entity (see RFC 2616 Section 9.6)");
> This should use the StringManager for i18n support.
> 
>> +    public boolean isParseBodyMethod(String method)
> This method could (should?) be protected rather then public.
> 
>> -        if (!getMethod().equalsIgnoreCase("POST"))
>> +        if(!getConnector().isParseBodyMethod(getMethod()))
> The Tomcat code style is to have a space after the if.
> 
>>      <changelog>
>> +      <update>
>> +        <bug>48692</bug>: Provide option to parse
>> +        <code>application/x-www-form-urlencoded</code> PUT requests.
(schultz)
>> +      </update>
>>        <fix>
>>          <bug>8705</bug>: <code>org.apache.catalina.SessionListener</code>
now
>>          extends <code>java.util.EventListener</code>. (markt)
> Bugs get added to the changelog in ascending numerical order within the
> appropriate section.
> 
>> +    <attribute name="parseBodyMethods" required="false">
>> +      <p>A comma-separated list of HTTP methods for which request
>> +      bodies will be parsed for request parameters identically
>> +      to POST. This is useful in RESTful applications that want to
>> +      support POST-style semantics for PUT requests.
>> +      Note that any setting other than <code>POST</code> causes Tomcat
>> +      to behave in a way that violates the servlet specification.
>> +      The HTTP method TRACE is specifically forbidden here in accordance
>> +      with the HTTP specification.
>> +      The default is <code>POST</code></p>
>> +    </attribute>
> "violates" is probably too strong a term here. There is some wiggle
> room in the language. I would suggest "goes against the intent" is
> probably closer.
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


Mime
View raw message