cfhttp port attribute is not supported

Description

When I run this code to check my elasticsearch version

<cfhttp url="http://localhost"
method="get"
charset="utf-8"
timeout="5"
result="stResponse"
port="9200">
<cfhttpparam type="header" name="Content-Type" value="application/json; charset=utf-8" />
</cfhttp>

it will ignore the port 9200 and get my webroot directory listing instead of the elasticsearch json information.

Only appending the port to the url works:

<cfhttp url="http://localhost:9200"
method="get"
charset="utf-8"
timeout="5"
result="stResponse">
<cfhttpparam type="header" name="Content-Type" value="application/json; charset=utf-8" />
</cfhttp>

Activity

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Priority

Sentry

Created March 18, 2025 at 5:17 PM
Updated March 18, 2025 at 6:45 PM
Resolved March 18, 2025 at 6:45 PM