During development we found that when we were accessing Exchange via WebDAV we kept getting 401 HTTP status codes for a few mailboxes. This was preventing us from doing any operation against the mailbox. So we started to troubleshoot the issue and we found that this problem was only showing up when the mailbox was created but was never logged into from OWA previously. After we logged in as the user from a web browser the problem went away and we were able to access the mailbox from WebDAV normally.
So we brought up our network sniffing tools to see just what was different between the PHP generated WebDAV request and the HTTP request. After comparing the request headers, we narrowed the difference and found that we were missing the Accept-Language and Accept-Charset headers that apparently Exchange requires.
Below is an example of the headers that we needed to add to the WebDAV request:
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Post a Comment