diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-18 05:52:51 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-01-18 05:52:51 -0800 |
commit | 0ed635240a56cc16596be39af7d71bdcd276425b (patch) | |
tree | 6d2b647b7d9d44e5bb5dd82d0f8a4dd1a94cea75 /lib | |
parent | 5df57e4ada4d9e5c9162173ea47512a57a2e2cd7 (diff) | |
parent | b4954c0c89a39e82ccada459337392d4d38aba5c (diff) | |
download | nextcloud-server-0ed635240a56cc16596be39af7d71bdcd276425b.tar.gz nextcloud-server-0ed635240a56cc16596be39af7d71bdcd276425b.zip |
Merge pull request #1205 from owncloud/ocs_api
Return 401 headers when trying to access a restricted api call
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api.php b/lib/api.php index 8d728d4311f..0fce109a423 100644 --- a/lib/api.php +++ b/lib/api.php @@ -94,6 +94,8 @@ class OC_API { $response = new OC_OCS_Result(null, 998, 'Api method not found'); } } else { + header('WWW-Authenticate: Basic realm="Authorization Required"'); + header('HTTP/1.0 401 Unauthorized'); $response = new OC_OCS_Result(null, 997, 'Unauthorised'); } // Send the response |