diff --git a/servers/rest_server/includes/RESTServer.inc b/servers/rest_server/includes/RESTServer.inc
index a456b76..dee3b9b 100755
--- a/servers/rest_server/includes/RESTServer.inc
+++ b/servers/rest_server/includes/RESTServer.inc
@@ -57,6 +57,8 @@ class RESTServer {
     $this->settings = rest_server_setup_settings($this->settings);
 
     $resources = services_get_resources($endpoint);
+    module_load_include('resource_build.inc', 'services');
+    _services_apply_endpoint($resources, $endpoint_definition, TRUE);
     $controller = FALSE;
     if (!empty($resource_name) && isset($resources[$resource_name])) {
       $resource = $resources[$resource_name];
diff --git a/services.info b/services.info
index 2154476..81c4e87 100644
--- a/services.info
+++ b/services.info
@@ -13,6 +13,7 @@ files[] = tests/functional/ServicesResourceSystemTests.test
 files[] = tests/functional/ServicesResourceCommentTests.test
 files[] = tests/functional/ServicesResourceTaxonomyTests.test
 files[] = tests/functional/ServicesResourceFileTests.test
+files[] = tests/functional/ServicesResourceDisabledTests.test
 files[] = tests/functional/ServicesEndpointTests.test
 files[] = tests/functional/ServicesParserTests.test
 files[] = tests/functional/ServicesAliasTests.test
diff --git a/tests/functional/ServicesResourceDisabledTests.test b/tests/functional/ServicesResourceDisabledTests.test
new file mode 100644
index 0000000..04aa50d
--- /dev/null
+++ b/tests/functional/ServicesResourceDisabledTests.test
@@ -0,0 +1,97 @@
+<?php
+
+
+
+/**
+ * @file
+ * Contains tests when a resource is disabled.
+ */
+
+/**
+ * Try to make a request to a disabled resource.
+ */
+class ServicesResourceDisabledTest extends ServicesWebTestCase {
+
+  /**
+   * Implementation of getInfo().
+   */
+  public static function getInfo() {
+    return array(
+      'name' => t('Services Disabled Resource Test'),
+      'description' => t('Assert that a resource is disabled when a request is made to it.'),
+      'group' => t('Services'),
+    );
+  }
+
+  /** 
+   * Implementation of setUp().
+   */
+  public function setUp() {
+    parent::setUp(
+      'ctools',
+      'services',
+      'rest_server'
+    );  
+    // Set up endpoint.
+    $this->endpoint =  $this->saveNewEndpoint();
+    // Set up privileged user and login.
+    $this->privileged_user = $this->drupalCreateUser(array('get a system variable', 'set a system variable'));
+    $this->drupalLogin($this->privileged_user);
+  }
+
+  /**
+   * Save a new endpoint without any resources enabled. This is a method from
+   * ServicesWebTestCase that has been modified.
+   */
+  public function saveNewEndpoint() {
+    $edit = $this->populateEndpointFAPI() ;
+    $endpoint = new stdClass;
+    $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
+    $endpoint->api_version = 3;
+    $endpoint->name = $edit['name'];
+    $endpoint->server = $edit['server'];
+    $endpoint->path = $edit['path'];
+    $endpoint->authentication = array(
+      'services' => 'services',
+    );  
+    $endpoint->server_settings = array(
+      'formatters' => array(
+        'json' => TRUE,
+        'bencode' => TRUE,
+        'rss' => TRUE,
+        'plist' => TRUE,
+        'xmlplist' => TRUE,
+        'php' => TRUE,
+        'yaml' => TRUE,
+        'jsonp' => FALSE,
+        'xml' => FALSE,
+      ),  
+      'parsers' => array(
+        'application/x-yaml' => TRUE,
+        'application/json' => TRUE,
+        'application/vnd.php.serialized' => TRUE,
+        'application/plist' => TRUE,
+        'application/plist+xml' => TRUE,
+        'application/x-www-form-urlencoded' => TRUE,
+        'multipart/form-data' => TRUE,
+      ),  
+    );  
+    $endpoint->debug = 1;
+    $endpoint->export_type = FALSE;
+    services_endpoint_save($endpoint);
+    $endpoint = services_endpoint_load($endpoint->name);
+    $this->assertTrue($endpoint->name == $edit['name'], t('Endpoint successfully created'));
+    return $endpoint;
+  }
+
+  /**
+   * Assert resource is disabled.
+   */
+  function testResourceDisabled() {
+    $path = $this->endpoint->path;
+    // Call as authenticated user.
+    $response = $this->servicesPost($path . '/system/connect');
+    $this->assertEqual($response['code'], 404, t('Services returned not found response code for disabled resource: %code.', array('%code' => $response['code'])));
+    $this->drupalLogout();
+  }
+}
