<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,7 @@
 2008-06-11 - Sean Huber (shuber@huberry.com)
+	* Requests with 404 responses are not type casted and return false with an error
+
+2008-06-11 - Sean Huber (shuber@huberry.com)
 	* Added url to http://github.com/shuber/curl
 
 2008-06-10 - Sean Huber (shuber@huberry.com)</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -87,11 +87,16 @@ class RestfulRails {
 		$url = $this-&gt;request_prefix.$url.$this-&gt;request_suffix;
 		$response = ($method == 'get') ? $this-&gt;curl-&gt;get($url, $vars) : $this-&gt;curl-&gt;post($url, $vars);
 		if ($response) {
-			try {
-				$type_casted_response = call_user_func($this-&gt;response_types[$this-&gt;response_type]['callback'], $response);
-			} catch (Exception $e) {
-				$type_casted_response = false;
-				$this-&gt;error = $e-&gt;getMessage();
+			if ($response-&gt;headers['Status-Code'] == '404') {
+				$this-&gt;error = 'Request to &quot;'.$url.'&quot; responded with a 404 - Not Found';
+				return false;
+			} else {
+				try {
+					$type_casted_response = call_user_func($this-&gt;response_types[$this-&gt;response_type]['callback'], $response);
+				} catch (Exception $e) {
+					$type_casted_response = false;
+					$this-&gt;error = $e-&gt;getMessage();
+				}
 			}
 			return $type_casted_response;
 		} else {</diff>
      <filename>restful_rails.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c2e7552986dc5d63189de58e2c90107a7162846</id>
    </parent>
  </parents>
  <author>
    <name>Sean Huber</name>
    <email>sean.huber@cox.net</email>
  </author>
  <url>http://github.com/shuber/restful_rails/commit/cf98fad612a96a50aff78d9271fc4f8ed5a972e7</url>
  <id>cf98fad612a96a50aff78d9271fc4f8ed5a972e7</id>
  <committed-date>2008-06-11T13:29:12-07:00</committed-date>
  <authored-date>2008-06-11T13:29:12-07:00</authored-date>
  <message>Requests with 404 responses are not type casted and return false with an error</message>
  <tree>90a3812c3fb9b4c576d5f8bf2dd43dc17b03371a</tree>
  <committer>
    <name>Sean Huber</name>
    <email>sean.huber@cox.net</email>
  </committer>
</commit>
