Search code examples
coldfusionmime-typescoldfusion-11

Unable to determine MIME type of file error is getting only for post calll


I use ColdFusion (CF) application with Java REST API which both are running locally now. The CF web applicaiton uses the API to draw it's some UI elements. So far I have few GET calls and one POST call.

When I try to make the POST call I get an error I have writedump the CF request and response variables.

PROPERTIES  
url http://localhost:8080/api/delivery/driverPartyProperties?access_token=6ce9a254-78e0-439c-4232-18563237cc
charset [empty string]
clientcert  [empty string]
clientcertpassword  [empty string]
columns [empty string]
delimiter   [empty string]
file    [empty string]
firstrowasheaders   [empty string]
getasbinary [empty string]
method  POST
multipart   [empty string]
multiparttype   [empty string]
name    [empty string]
password    [empty string]
path    [empty string]
port    [empty string]
proxyserver [empty string]
proxyport   [empty string]
proxyuser   [empty string]
proxypassword   [empty string]
redirect    [empty string]
resolveurl  [empty string]
result  [empty string]
textqualifier   [empty string]
throwonerror    [empty string]
timeout 5
useragent   [empty string]
username    [empty string]

The response

struct
Charset [empty string]
ErrorDetail [empty string]
Filecontent Connection Timeout
Header  [empty string]
Mimetype    Unable to determine MIME type of file.
Responseheader  
struct [empty]
Statuscode  408 Request Time-out
Text    YES

On API side I see the request comes and sends the response as well. I am new to CF language. Can anybody give me a hint?


Solution

  • After struggling on this problem quite while, we found that it happens from <cftransaction> tag in the view. As I mentioned before, we were replacing some ui components from API endpoint we didn't need this <cftransaction> anymore in the view. We used to do SQL queries to the database and handle the view and this is where we used that tag. The main problem was the error I got from request misleading.