There are two states involved here. If the remote server
returns an
HTTP error, even a timeout one, that is NOT a <cfhttp>
timeout error.
<cfhttp> go a response, the http error message and that
response will be
placed into the <cfhttp> response structure. So yes,
you can count on
the status_code being any status_code the remote server
returned, and
the filecontent to be any file content returned.
The <cfhttp...> timeout parameter is how long the
process will wait for
any response from the remote server. If no response, http
error or
otherwise, is received within the specified time limit cfhttp
will throw
a ColdFusion exception that you handle with ColdFusion
exception
handling functions.
So you have two questions to ask when working with
<cfhttp...>. Did I
get a response? And if so, what was that response?
leesiulung2006 wrote:
> jdeline,
>
> I am aware of the filecontent and the return value of
cfhttp. However, can I
> assume that after the "call" to cfhttp tags the
> cfhttp.Responseheader.Status_Code will always be filled
out afterwards? Is this
> how I get notified of a 408 Timeout?
>
> Seems like the documentation although available seems to
be missing detailed
> information about how to handle things or it is me who
is not as familiar with
> how html pages with headers etc... are handled.
>
> thanks jdeline!
>