tracker issue : CF-4149198

select a category, or use search below
(searches all categories and all time range)
Title:

Body Ignored in HTTP PUT/PATCH (and DELETE)

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Matthew Clemente / Matthew Clemente (Matthew Clemente)

Created: 05/05/2016

Components: Net Protocols

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description: CF ignores the body content sent via HTTP PUT and PATCH requests

Steps to Reproduce:

INDEX.cfm:
<!DOCTYPE html>
<html>

<head>
  <title>Checking ColdFusion's Support For PUT/PATCH/DELETE</title>
</head>

<body>
  <h1>Checking ColdFusion's Support For PUT/PATCH/DELETE</h1>
  <table>
    <tr>
      <td>
        <h2>PUT Response</h2>
        <div id="putResponse"></div>
      </td>
    </tr>
    <tr>
      <td>
        <h2>PATCH Response</h2>
        <div id="patchResponse"></div>
      </td>
    </tr>
    <tr>
      <td>
        <h2>DELETE Response (Using JSON.stringify)</h2>
        <div id="deleteResponse"></div>
      </td>
    </tr>
  </table>
  <InvalidTag src="https://code.jquery.com/jquery-1.7.1.min.js" integrity="sha256-iBcUE/x23aI6syuqF7EeT/+JFBxjPs5zeFJEXxumwb0=" crossorigin="anonymous"></script>
  <InvalidTag type="text/javascript">
  // Make PUT request.
  $.ajax({
    type: "PUT",
    url: "./put.cfm?dataValue1=Sent+in+URL",
    contentType: "application/json",
    data: JSON.stringify({
      dataValue2: "Sent in Data."
    }),
    dataType: "html",
    success: function(content) {
      // Inject PUT output.
      $("#patchResponse").html(content);
    }
  });
// Make PATCH request.
  $.ajax({
    type: "PATCH",
    url: "./put.cfm?dataValue1=Sent+in+URL",
    contentType: "application/json",
    data: JSON.stringify({
      dataValue2: "Sent in Data."
    }),
    dataType: "html",
    success: function(content) {
      // Inject PUT output.
      $("#putResponse").html(content);
    }
  });
  // Make DELETE request.
  $.ajax({
    type: "DELETE",
    url: "./put.cfm?dataValue1=Sent+in+URL",
    contentType: "application/json",
    data: JSON.stringify({
      dataValue2: "Sent in Data."
    }),
    dataType: "html",
    success: function(content) {
      // Inject DELETE output.
      $("#deleteResponse").html(content);
    }
  });
  </script>
</body>

</html>
______________

PUT.cfm:
<cfsetting showdebugoutput="false">
<cfdump var="#getHttpRequestData()#">
_______________________

Actual Result: content is empty (binary and empty)

Expected Result: content should be the string: '{"dataValue2":"Sent in Data."}'

Any Workarounds: no

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4149198

External Customer Info:
External Company:  
External Customer Name: Matthew Clemente
External Customer Email:  
External Test Config: My Hardware and Environment details:



Version	11,0,07,296330

Tomcat Version	7.0.64.0

Edition	Developer 

Operating System	Windows Server 2012 R2 

OS Version	6.3 

Update Level	C:/ColdFusion11/cfusion/lib/updates/hf1100-3929327.jar 

Adobe Driver Version	5.1.3 (Build 000094) 

Java Version: 1.8.0_66

Attachments:

Comments:

The fix will be available in the next ColdFusion update. Thanks!
Comment by S P.
2933 | June 22, 2016 05:27:40 AM GMT