emergence
10/15/2024, 6:49 PMbdw429s
10/15/2024, 6:51 PMbdw429s
10/15/2024, 6:51 PMbdw429s
10/15/2024, 6:52 PMbdw429s
10/15/2024, 6:52 PMbdw429s
10/15/2024, 6:52 PMthrowonerror=true
bdw429s
10/15/2024, 6:52 PMbdw429s
10/15/2024, 6:52 PMbdw429s
10/15/2024, 6:52 PMemergence
10/15/2024, 6:58 PMbdw429s
10/15/2024, 6:59 PMbdw429s
10/15/2024, 6:59 PMemergence
10/15/2024, 6:59 PMlucee.runtime.exp.NativeException: Connection reset at java.base/java.net.SocketInputStream.read(Unknown Source) at java.base/java.net.SocketInputStream.read(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source) at <http://org.apache.http.impl.io|org.apache.http.impl.io>.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) at <http://org.apache.http.impl.io|org.apache.http.impl.io>.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) at <http://org.apache.http.impl.io|org.apache.http.impl.io>.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at <http://org.apache.http.impl.io|org.apache.http.impl.io>.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at lucee.runtime.tag.Executor4.execute(Http.java:1909) at lucee.runtime.tag.Executor4.run(Http.java:1896) at lucee.commons.lang.PageContextThread.run(PageContextThread.java:25) Caused by: java.net.SocketException: Connection reset ... 26 more
bdw429s
10/15/2024, 7:00 PMlucee.runtime.exp.NativeException: Connection reset
at java.base/java.net.SocketInputStream.read(Unknown Source)
at java.base/java.net.SocketInputStream.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at lucee.runtime.tag.Executor4.execute(Http.java:1909)
at lucee.runtime.tag.Executor4.run(Http.java:1896)
at lucee.commons.lang.PageContextThread.run(PageContextThread.java:25)
Caused by: java.net.SocketException: Connection reset ... 26 more
bdw429s
10/15/2024, 7:01 PMbdw429s
10/15/2024, 7:01 PMbdw429s
10/15/2024, 7:01 PMbdw429s
10/15/2024, 7:01 PMbdw429s
10/15/2024, 7:02 PMemergence
10/15/2024, 7:02 PMbdw429s
10/15/2024, 7:02 PMbdw429s
10/15/2024, 7:02 PMPOST
HTTP request works, but a GET
to the exact same host gets the socket reset 🤔emergence
10/15/2024, 7:03 PMbdw429s
10/15/2024, 7:03 PMbdw429s
10/15/2024, 7:03 PMbdw429s
10/15/2024, 7:03 PMbdw429s
10/15/2024, 7:04 PMi get an access token via a post call to same host, no issues
emergence
10/15/2024, 7:05 PM<cfhttp url="#local.theURI#" method="post" result="local.result" timeout="#local.maxTimeout#" compression="false" throwonerror="true">
<cfhttpparam type="xml" file="#local.xmlString#" />
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
</cfhttp>
emergence
10/15/2024, 7:06 PMemergence
10/15/2024, 7:19 PM$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("authToken", $token)
$headers.Add("reference-id", "IT001")
# Create the form data with the file
$form = @{
file = Get-Item -Path $xmlFilePath
}
$response = Invoke-RestMethod $theURI -Method 'POST' -Headers $headers -Form $form -ContentType "multipart/form-data"
paul
10/16/2024, 1:19 AMpaul
10/16/2024, 1:19 AMpaul
10/16/2024, 1:19 AMpaul
10/16/2024, 1:20 AMpaul
10/16/2024, 1:21 AMrodyon
10/16/2024, 1:23 PMemergence
10/16/2024, 1:33 PMemergence
10/16/2024, 1:37 PM<cftry>
<cfhttp url="#local.theURI#" method="post" result="local.result1" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="formfield" name="file" value="#local.xmlTempPath#" />
</cfhttp>
<cfcatch type="any">
<cfdump var="#cfcatch#" label="result1"/>
</cfcatch>
</cftry>
<cftry>
<cfhttp url="#local.theURI#" method="post" result="local.result2" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="file" name="file" file="#local.xmlTempPath#" />
</cfhttp>
<cfcatch type="any">
<cfdump var="#cfcatch#" label="result2"/>
</cfcatch>
</cftry>
<cftry>
<cfhttp url="#local.theURI#" method="post" result="local.result3" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="formfield" name="file" value="#local.xmlTempPath#" />
</cfhttp>
<cfcatch type="any">
<cfdump var="#cfcatch#" label="result3"/>
</cfcatch>
</cftry>
<cftry>
<cfhttp url="#local.theURI#" method="post" result="local.result4" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="xml" value="#local.xmlTempPath#" />
</cfhttp>
<cfcatch type="any">
<cfdump var="#cfcatch#" label="result4"/>
</cfcatch>
</cftry>
All received the same Connection Reset error, so something in the request the server must not like
lucee.runtime.exp.NativeException: Connection reset at java.base/java.net.SocketInputStream.read(Unknown Source) at java.base/java.net.SocketInputStream.read(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source) at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source) at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at lucee.runtime.tag.Executor4.execute(Http.java:1909) at lucee.runtime.tag.Executor4.run(Http.java:1896) at lucee.commons.lang.PageContextThread.run(PageContextThread.java:25) Caused by: java.net.SocketException: Connection reset ... 26 more
s1deburn
10/16/2024, 2:07 PMemergence
10/16/2024, 2:22 PMs1deburn
10/16/2024, 2:26 PMemergence
10/16/2024, 2:26 PMemergence
10/16/2024, 3:04 PM--ccd8c057-34f5-4d16-856e-aa6adf95ab37 Content-Disposition: form-data; name=file; filename=34176-61421.xml; filename*=utf-8''34176-61421.xml Content-Type: application/octet-stream
first characters of lucee
--XFuZC2y7FkKIsKMPWAmXae-hiBkrfLWB Content-Disposition: form-data; name="file" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
but this was sending it via the formfield httpparam
<cfhttp url="#local.theURI#" method="post" result="local.result1" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="formfield" name="file" value="#local.xmlString#" />
</cfhttp>
emergence
10/16/2024, 3:11 PMContent-Disposition: form-data; name="file"; filename="exportToRemote_39_2E1EA35E-32CB-4C3D-8FE6-2C70DC69B0DD.xml" Content-Type: application/octet-stream Content-Transfer-Encoding: binary
<cfhttp url="#local.theURI#" method="post" result="local.result2" timeout="#local.maxTimeout#" throwonerror="true" multipart="true">
<cfhttpparam type="header" name="reference-id" value="#local.referenceID#" />
<cfhttpparam type="header" name="authToken " value="#local.token#" />
<cfhttpparam type="file" name="file" file="#local.xmlTempPath#" mimetype="application/octet-stream" />
</cfhttp>
s1deburn
10/16/2024, 4:52 PMemergence
10/21/2024, 1:54 PM