0

我正在尝试将事件添加到激进服务器,但它以“前提条件失败”消息响应。我的请求可能有问题,但我无法得到它。以下是我的要求:

PUT /user/user1.ics/20130810T095754Z-1926-1000-1-3_media80-20130810T095803Z.ics HTTP/1.1
Host: localhost:5232
User-Agent: Evolution/2.28.3.1
If-None-Match: *
Content-Type: text/calendar; charset=utf-8
Content-Length: 720

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
PRODID:-//Ximian//NONSGML Evolution Calendar//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:/freeassociation.sourceforge.net/Tzfile/Asia/Kolkata
X-LIC-LOCATION:Asia/Kolkata
BEGIN:STANDARD
TZNAME:IST
DTSTART:19701014T230000
TZOFFSETFROM:+0530
TZOFFSETTO:+0530
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:20130810T095754Z-1926-1000-1-3@media
DTSTAMP:20130810T095754Z
DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/Asia/Kolkata:
 20130810T200000
DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/Asia/Kolkata:
 20130810T203000
TRANSP:OPAQUE
SEQUENCE:2
SUMMARY:Test4
CLASS:PUBLIC
CREATED:20130810T095803Z
LAST-MODIFIED:20130810T095803Z
END:VEVENT
END:VCALENDAR
4

1 回答 1

1

你确定资源在

/user/user1.ics/20130810T095754Z-1926-1000-1-3_media80-20130810T095803Z.ics

不存在?

If-None-Match: *

标头指示如果该 URI 处已有资源,则 PUT 应该失败并显示“412 Precondition Failed”。

于 2013-08-12T09:14:17.980 回答