Steve,

How!!!!!

Without a cftry block this is what I get returned from the all 3 solutions that you provided.

Connection failed with no response code. Here is a copy of the cfdump from a test page that only has the cfhttp request.


 
<style>
table.cfdump_wddx,
table.cfdump_xml,
table.cfdump_struct,
table.cfdump_array,
table.cfdump_query,
table.cfdump_cfc,
table.cfdump_object,
table.cfdump_binary,
table.cfdump_udf,
table.cfdump_udfbody,
table.cfdump_udfarguments {
 font-size: xx-small;
 font-family: verdana, arial, helvetica, sans-serif;
 cell-spacing: 2;
}

table.cfdump_wddx th,
table.cfdump_xml th,
table.cfdump_struct th,
table.cfdump_array th,
table.cfdump_query th,
table.cfdump_cfc th,
table.cfdump_object th,
table.cfdump_binary th,
table.cfdump_udf th,
table.cfdump_udfbody th,
table.cfdump_udfarguments th {
 text-align: left;
 color: white;
 padding: 5;
}

table.cfdump_wddx td,
table.cfdump_xml td,
table.cfdump_struct td,
table.cfdump_array td,
table.cfdump_query td,
table.cfdump_cfc td,
table.cfdump_object td,
table.cfdump_binary td,
table.cfdump_udf td,
table.cfdump_udfbody td,
table.cfdump_udfarguments td {
 padding: 3;
 background-color: ffffff;
 vertical-align : top;
}

table.cfdump_wddx {
 background-color: 000000;
}
table.cfdump_wddx th.wddx {
 background-color: 444444;
}


table.cfdump_xml {
 background-color: 888888;
}
table.cfdump_xml th.xml {
 background-color: aaaaaa;
}
table.cfdump_xml td.xml {
 background-color: dddddd;
}

table.cfdump_struct {
 background-color: 0000cc ;

}
table.cfdump_struct th.struct {
 background-color: 4444cc ;
}
table.cfdump_struct td.struct {
 background-color: ccddff;
}

table.cfdump_array {
 background-color: 006600 ;
}
table.cfdump_array th.array {
 background-color: 009900 ;
}
table.cfdump_array td.array {
 background-color: ccffcc ;
}

table.cfdump_query {
 background-color: 884488 ;
}
table.cfdump_query th.query {
 background-color: aa66aa ;
}
table.cfdump_query td.query {
 background-color: ffddff ;
}


table.cfdump_cfc {
 background-color: ff0000;
}
table.cfdump_cfc th.cfc{
 background-color: ff4444;
}
table.cfdump_cfc td.cfc {
 background-color: ffcccc;
}


table.cfdump_object {
 background-color : ff0000;
}
table.cfdump_object th.object{
 background-color: ff4444;
}

table.cfdump_binary {
 background-color : eebb00;
}
table.cfdump_binary th.binary {
 background-color: ffcc44;
}
table.cfdump_binary td {
 font-size: x-small;
}
table.cfdump_udf {
 background-color: aa4400;
}
table.cfdump_udf th.udf {
 background-color: cc6600;
}
table.cfdump_udfarguments {
 background-color: dddddd;
 cell-spacing: 3;
}
table.cfdump_udfarguments th {
 background-color: eeeeee;
 color: 000000;
}

</style>
 
<script language="_javascript_">
 function dump ( obj ) {
  var out = '' ;
  if ( typeof obj == "object" ) {
   for ( key in obj ) {
    if ( typeof obj[key] != "function" ) out += key + ': ' + obj[key] + '<br>' ;
   }
  }
 }


 function cfdump_toggleRow(source) {
  //target is the right cell
  if(document.all) target = source.parentElement.cells[1];
  else target = source.parentNode.lastChild ;

  cfdump_toggleTarget( target, cfdump_toggleSource( source ) ) ;
 }

 function cfdump_toggleXmlDoc(source) {

  var caption = source.innerHTML.split( ' [' ) ;

  // toggle source (header)
  if ( source.style.fontStyle == 'italic' ) {
   // closed -> short
   source.style.fontStyle = 'normal' ;
   source.innerHTML = caption[0] + ' [short version]' ;
   source.title = 'click to maximize' ;
   switchShortToState = 'open' ;
  } else if ( source.innerHTML.indexOf('[short version]') != -1 ) {
   // short -> full
   source.innerHTML = caption[0] + ' [long version]' ;
   source.title = 'click to collapse' ;
   switchLongToState = 'open' ;
   switchShortToState = 'closed' ;
  } else {
   // full -> closed
   source.style.fontStyle = 'italic' ;
   source.title = 'click to expand' ;
   source.innerHTML = caption[0] ;
   switchLongToState = 'closed' ;
  }

  // Toggle the target (everething below the header row).
  // First two rows are XMLComment and XMLRoot - they are part
  // of the long dump, the rest are direct children - part of the
  // short dump
  if(document.all) {
   var table = source.parentElement.parentElement ;
   for ( var i = 1; i < table.rows.length; i++ ) {
    target = table.rows[i] ;
    if ( i < 3 ) cfdump_toggleTarget( target, switchLongToState ) ;
    else cfdump_toggleTarget( target, switchShortToState ) ;
   }
  }
  else {
   var table = source.parentNode.parentNode ;
   var row = 1;
   for ( var i = 1; i < table.childNodes.length; i++ ) {
    target = table.childNodes[i] ;
    if( target.style ) {
     if ( row < 3 ) {
      cfdump_toggleTarget( target, switchLongToState ) ;
     } else {
      cfdump_toggleTarget( target, switchShortToState ) ;
     }
     row++;
    }
   }
  }
 }

 function cfdump_toggleTable(source) {

  var switchToState = cfdump_toggleSource( source ) ;
  if(document.all) {
   var table = source.parentElement.parentElement ;
   for ( var i = 1; i < table.rows.length; i++ ) {
    target = table.rows[i] ;
    cfdump_toggleTarget( target, switchToState ) ;
   }
  }
  else {
   var table = source.parentNode.parentNode ;
   for ( var i = 1; i < table.childNodes.length; i++ ) {
    target = table.childNodes[i] ;
    if(target.style) {
     cfdump_toggleTarget( target, switchToState ) ;
    }
   }
  }
 }

 function cfdump_toggleSource ( source ) {
  if ( source.style.fontStyle == 'italic' ) {
   source.style.fontStyle = 'normal' ;
   source.title = 'click to collapse' ;
   return 'open' ;
  } else {
   source.style.fontStyle = 'italic' ;
   source.title = 'click to expand' ;
   return 'closed' ;
  }
 }

 function cfdump_toggleTarget ( target, switchToState ) {
  if ( switchToState == 'open' ) target.style.display = '' ;
  else target.style.display = 'none' ;
 }
</script>
  
 <table class="cfdump_struct">
 <tr><th class="struct" colspan="2" style="cursor:hand;" title="click to collapse">struct</th></tr>
 
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Charset</td>
  <td>[empty string]</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">ErrorDetail</td>
  <td>Connect Exception: Connection timed out: connect</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Filecontent</td>
  <td>Connection Failure</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Header</td>
  <td>[undefined struct element]</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Mimetype</td>
  <td>Unable to determine MIME type of file.</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Responseheader</td>
  <td>
 <table class="cfdump_struct">
 <tr><th class="struct" colspan="2" style="cursor:hand;" title="click to collapse">struct [empty]</th></tr>
 
 </table>
 </td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Statuscode</td>
  <td>Connection Failure.  Status code unavailable.</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Text</td>
  <td>YES</td></tr>
 </table>
 
 <table class="cfdump_struct">
 <tr><th class="struct" colspan="2" style="cursor:hand;" title="click to collapse">struct</th></tr>
 
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Charset</td>
  <td>[empty string]</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">ErrorDetail</td>
  <td>Connect Exception: Connection timed out: connect</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Filecontent</td>
  <td>Connection Failure</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Header</td>
  <td>[undefined struct element]</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Mimetype</td>
  <td>Unable to determine MIME type of file.</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Responseheader</td>
  <td>
 <table class="cfdump_struct">
 <tr><th class="struct" colspan="2" style="cursor:hand;" title="click to collapse">struct [empty]</th></tr>
 
 </table>
 </td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Statuscode</td>
  <td>Connection Failure.  Status code unavailable.</td></tr>
  <tr><td class="struct" style="cursor:hand;" title="click to collapse">Text</td>
  <td>YES</td></tr>
 </table>



Regards
Andrew Scott
Technical Consultant

NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9686 0485  -  Fax: 03 9699 7976


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Steve Onnis
Sent: Friday, 1 April 2005 1:58 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: cfhttp

Andrew

Thats fine

catch it and make it error.  If it errors cause of the redirect then you know that the url actually exists, but its redirecting. so in your cfcatch, do another cfhttp without it erroring so that you can actually get the status code that is being returned by cfhttp.  if is a 404 or something you can then tell if its there ot not.  if its a redirect, catch it, do what you need to do with it.

You CAN call more then one CFHTTP in a single request you know.

All you need to do is use the data that is returned to determine what you need to do with it.

Remember, think outside the square, not just in your head

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to