hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1786295 - /httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java
Date Fri, 10 Mar 2017 07:52:31 GMT
Author: ggregory
Date: Fri Mar 10 07:52:31 2017
New Revision: 1786295

URL: http://svn.apache.org/viewvc?rev=1786295&view=rev
Log:
[HTTPCLIENT-1828] HttpDelete does not extend HttpEntityEnclosingRequestBase.

Modified:
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java?rev=1786295&r1=1786294&r2=1786295&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/client/methods/HttpDelete.java
Fri Mar 10 07:52:31 2017
@@ -34,14 +34,21 @@ import java.net.URI;
  * <p>
  * The HTTP DELETE method is defined in section 9.7 of
  * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>:
- * <blockquote>
- * The DELETE method requests that the origin server delete the resource
- * identified by the Request-URI. [...] The client cannot
- * be guaranteed that the operation has been carried out, even if the
- * status code returned from the origin server indicates that the action
- * has been completed successfully.
- * </blockquote>
- *
+ * </p>
+ * <blockquote> The DELETE method requests that the origin server delete the
+ * resource identified by the Request-URI. [...] The client cannot be guaranteed
+ * that the operation has been carried out, even if the status code returned
+ * from the origin server indicates that the action has been completed
+ * successfully. </blockquote>
+ * <p>
+ * RFC2616 says that a "message-body MUST NOT be included in a request if the
+ * specification of the request method (section 5.1.1) does not allow sending an
+ * entity-body in requests." Section 5.1.1 then points to
+ * https://tools.ietf.org/html/rfc2616#section-9.7 for the DELETE method which
+ * in turn does not say anything about allowing or disallowing a message-body.
+ * So we allow DELETE to have a body for flexibility.
+ * </p>
+ * 
  * @since 4.0
  */
 public class HttpDelete extends HttpEntityEnclosingRequestBase {



Mime
View raw message