I think I understand what my server needs to do as you outline below.
Here is an actual (partial) response to a preflight PUT request from
Access-Control-Allow-Methods: OPTIONS, GET, HEAD, PUT, DELETE
Access-Control-Allow-Methods: PROPFIND, REPORT, COPY, MOVE, LOCK, UNLOCK
What I'm asking is if your client would like to get the ETag from the
response to the actual PUT, would the browser allow it? Do I need to
include Access-Control-Expose-Headers: ETag to allow it?
The reason I ask this particular question is that your client does a
calendar-multiget REPORT immediately following the PUT asking for the
getetag and calendar-data properties. Are you doing this because this
is the only way to get the ETag, or do you want to make sure that the
calendar-data is the same as what you PUT, or both?
Obviously, the ETag should be available in the PUT response and if you
use the Prefer:return=representation header, the server might also give
you the calendar-data in the PUT response body saving a round-trip. See
On 05/29/2013 11:19 AM, Ján Máté wrote:
the problem is not as simple as it looks like. We cannot use "simple" headers,
because if a browser detects any cross-domain query (different protocol/domain or port),
it will make a "preflight" OPTIONS request and if there are no proper CORS
headers in the response, the browser will refuse to make the real request (from
internally by browsers).
Correct CORS headers for CardDavMATE/CalDavZAP looks like:
=> everybody can make request to this server
=> all allowed methods (even if you return something like "unsupported" or
"not implemented" for some of them)
=> all standard headers used by dav clients/browsers (sometime you need to add
another one for new client ... so it is good to have a configuration option for additional
On May 29, 2013, at 4:28 PM, Ken Murchison<murch(a)andrew.cmu.edu> wrote:
> I'm adding support for CORS requests to my server and I'm wondering if
there any response headers that you need/want exposed. I'm not familiar with
XMLHttpRequest so I don't know what you have access to normally. Non-simple response
headers that I think might be useful:
> Right now, your client works fine without Access-Control-Expose-Headers in the
response, but I'm just trying to future-proof my code.
> Kenneth Murchison
> Principal Systems Software Engineer
> Carnegie Mellon University
Principal Systems Software Engineer
Carnegie Mellon University