Index: bitcache.admin.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/bitcache/bitcache.admin.inc,v
retrieving revision 1.23
diff -u -r1.23 bitcache.admin.inc
--- bitcache.admin.inc 18 Mar 2009 07:04:05 -0000 1.23
+++ bitcache.admin.inc 26 Mar 2009 01:03:52 -0000
@@ -25,7 +25,7 @@
$form['server']['bitcache_features'] = array(
'#type' => 'checkboxes',
'#title' => t('Enabled features'),
- '#default_value' => array_filter(variable_get('bitcache_features', array('index', 'get', 'post', 'put', 'delete')), 'is_string'),
+ '#default_value' => array_filter(variable_get('bitcache_features', array('index' => t('INDEX'), 'get' => t('GET/HEAD'), 'post' => t('POST'), 'put' => t('PUT'), 'delete' => t('DELETE'))), 'is_string'),
'#options' => array('index' => t('INDEX'), 'get' => t('GET/HEAD'), 'post' => t('POST'), 'put' => t('PUT'), 'delete' => t('DELETE')),
'#description' => t('Determines which HTTP methods will be supported in the REST API. For finer-grained access controls based on user credentials, refer to the Drupal permissions for Bitcache.', array('@manage-perms' => url('admin/user/permissions', array('fragment' => 'module-bitcache')))),
);
Index: bitcache.server.inc
===================================================================
RCS file: /cvs/drupal/contributions/modules/bitcache/bitcache.server.inc,v
retrieving revision 1.14
diff -u -r1.14 bitcache.server.inc
--- bitcache.server.inc 18 Mar 2009 07:04:05 -0000 1.14
+++ bitcache.server.inc 26 Mar 2009 01:03:52 -0000
@@ -102,7 +102,7 @@
protected function allow($method, $id = NULL) {
$method = ($method == 'GET' && !$id) ? 'INDEX' : 'GET'; // TODO: should be handled in base class
- $methods = array_filter(variable_get('bitcache_features', array('index', 'get', 'post', 'put', 'delete')), 'is_string');
+ $methods = array_filter(variable_get('bitcache_features', array('index' => 'INDEX', 'get' => 'GET/HEAD', 'post' => 'POST', 'put' => 'PUT', 'delete' => 'DELETE')), 'is_string');
if (($method != 'HEAD' && empty($methods[strtolower($method)])) || ($method == 'HEAD' && empty($methods['get']))) {
return FALSE;
}