What is HTTP Error '401 - ERROR: Access Denied'?
The HTTP 401 – Unauthorised response generally occurs when there is a problem with the credentials used or the completeness of the HTTP POST.
Actions:
Tip: You may want to capture a TCP dump (a .pcap file) to ensure that you have full visibility of the POST being sent. If any of the user details are missing, check your application to find out why the full set of details is not present.
Example:
From our Apache_access logs we can see the username ‘customerxxx’ is present in the first two examples which are shown as underlined in the example below, indicating a successful POST.
The HTTP 401 shows a ‘-‘ in place of the username, and therefore indicates that it was not present in the HTTP POST, therefore returning the HTTP 401 – Unauthorised response.
### Correct Submission - HTTP 200 OK
23.32.23.32 - customerabc [24/Oct/2012:17:31:26 +0200] "POST /customerabc/customerabc.sms HTTP/1.1" 200 171 "messaging.sybase365.com" 0
99.88.77.66 - customerdef [24/Oct/2012:17:31:26 +0200] "POST /customerdef/customerdef.sms HTTP/1.1" 200 182 "messaging.sybase365.com" 0
### HTTP 401 - Unauthorised
11.22.33.44 - - [24/Oct/2012:17:31:18 +0200] "POST /customerzzz/customerzzz.sms HTTP/1.0" 401 477 "messaging.sybase365.com" 0
Note: The entries above are amended from real examples and so the IP Address and username details are not real, and is provided for illustrative purposes only.
For information on and the meaning of other HTTP Error or Status Codes check the HTTP Interface Specification or search for 'HTTP status codes' or 'HTTP error codes' in Wikipedia.