tracker issue : CF-3525414

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

cfhttpparam Content-Type on GETs

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Nick Walters / Nick Walters (fedsol)

Created: 03/19/2013

Components: Net Protocols

Versions: 9.0.1

Failure Type: Non Functioning

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Server R2

Vote Count: 0

Problem Description: cfhttpparam name=Content-Type does not appear if the method is GET. This is probably because technically it's nonsensical to specify a Type for Content that doesn't exist. Some very large companies are making very important REST APIs, however, that require Content-Type on GETs, and ColdFusion appears to be the only language incapable of natively consuming them. In other languages (even in ColdFusion's underlying Java), the HTTP engine does what you ask, even if what you ask doesn't technically make sense according to the letter of the RFCs. ColdFusion's behavior in this case isn't RFC-letter-of-the-law wrong, but it is wrong in the sense that our tools should do what we ask where possible, even if what we ask seems weird. The reality of REST APIs is that sometimes the people creating them don't understand all the rules of the RFCs, and our toolset should work for us, not against us, allowing us to consume any REST API, even semantically incorrect ones.

Steps to Reproduce: <cfhttp method=GET url=anything><cfhttpparam type=header name=Content-Type value=anything></cfhttp>

Actual Result: Content-Type header is not present on CFHTTP call

Expected Result: Content-Type header should appear like any other. I don't have a CF10 version to check this on, but searching the forums and Google I've found other people complaining about this and no mention that it was fixed in 10. The problem will only get worse as REST becomes more prevalent.

Any Workarounds: Short of dropping down to Java or using third-party DLLs, no.

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

Watson Bug ID:	3525414

External Customer Info:
External Company:  
External Customer Name: fedsol
External Customer Email:  
External Test Config: Java 6 Win 2008 CF 9.0.1 CHF4

Attachments:

Comments:

Argh I dunno what is wrong with me, I mistakenly said cfheader in the title and first sentence of the description. It's cfhttpparam. Bugbase doesn't allow me to edit the bug.
Comment by External U.
15966 | March 19, 2013 09:26:42 PM GMT
This is not a bug. As you said, Content-Type header makes sense for POST request and not for GET request. Rest services use accept header for content negotiation and not the Content-type header.
Comment by Rupesh K.
15967 | November 18, 2014 09:09:58 AM GMT