Skip to content

Commit

Permalink
fix(CfhttpHttpClient): Add an additional fallback status check
Browse files Browse the repository at this point in the history
This is specifically for when a request times out due to the `timeout` attribute.
  • Loading branch information
elpete committed Jun 15, 2023
1 parent fdc507f commit adf9575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/CfhttpHttpClient.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ component implements="HyperHttpClientInterface" {
originalRequest = req,
executionTime = getTickCount() - startTick,
charset = cfhttpResponse.charset ?: "UTF-8",
statusCode = cfhttpResponse.responseheader.status_code ?: 504,
statusText = cfhttpResponse.responseheader.explanation ?: "Gateway Timeout",
statusCode = cfhttpResponse.responseheader.status_code ?: cfhttpResponse.status_code ?: 504,
statusText = cfhttpResponse.responseheader.explanation ?: cfhttpResponse.status_text ?: "Gateway Timeout",
headers = normalizeHeaders( cfhttpResponse ),
data = cfhttpResponse.filecontent
);
Expand Down

0 comments on commit adf9575

Please sign in to comment.