Google api Google CalDAV:PUT事件中的错误请求

Google api Google CalDAV:PUT事件中的错误请求,google-api,icalendar,caldav,Google Api,Icalendar,Caldav,我正在使用CalDAV开发一个日历客户端。我正试图在我的谷歌日历上创建一个活动。最后的PUT请求有什么问题导致错误的请求错误 这是我前两个成功请求和坏请求的日志!提交请求: PUT https://apidata.googleusercontent.com/caldav/v2/altostratous@gmail.com/events/fc4eae83-a429-4cd0-8d1e-4adbf9771969.ics HTTP/1.1 Authorization: Bearer ya29.Ci_5

我正在使用CalDAV开发一个日历客户端。我正试图在我的谷歌日历上创建一个活动。最后的PUT请求有什么问题导致错误的请求错误

这是我前两个成功请求和坏请求的日志!提交请求:

PUT https://apidata.googleusercontent.com/caldav/v2/altostratous@gmail.com/events/fc4eae83-a429-4cd0-8d1e-4adbf9771969.ics HTTP/1.1
Authorization: Bearer ya29.Ci_5AnP1bx1kKPhytjF3axMpsMhqhYppH2RsRhgn64Nnpun8KW3Eb9PV2aT8vlsTyA
Host: apidata.googleusercontent.com
If-None-Match: *
Content-Type: text/calendar
Content-Length: 283

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//tracky/iCal//FUBU v1.0//EN
BEGIN:VEVENT
UID:fc4eae83-a429-4cd0-8d1e-4adbf9771969
DESCRIPTION:this is a description
DTSTAMP:20160606T102724Z
LAST-MODIFIED:20160606T102724Z
SEQUENCE:-2147483647
SUMMARY:summary
END:VEVENT
END:VCALENDAR
请求选项:

OPTIONS https://apidata.googleusercontent.com/caldav/v2/altostratous@gmail.com/events/ HTTP/1.1
Authorization: Bearer ya29.Ci_5AnP1bx1kKPhytjF3axMpsMhqhYppH2RsRhgn64Nnpun8KW3Eb9PV2aT8vlsTyA
Host: apidata.googleusercontent.com
Content-Length: 0
Connection: Keep-Alive
选项响应:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Mon, 06 Jun 2016 10:27:23 GMT
Allow: DELETE, GET, HEAD, OPTIONS, PROPFIND, PROPPATCH, PUT, REPORT
Content-Disposition: attachment
DAV: 1, calendar-access, calendar-schedule, calendar-auto-schedule, calendar-proxy
Vary: Origin
Vary: X-Origin
Content-Type: text/plain
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 0
Server: GSE
Alternate-Protocol: 443:quic
Alt-Svc: quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"
HTTP/1.1 207 Multi-Status
Vary: X-Origin
Content-Type: text/xml; charset=UTF-8
Date: Mon, 06 Jun 2016 10:27:24 GMT
Expires: Mon, 06 Jun 2016 10:27:24 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic
Alt-Svc: quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked

39d
<?xml version="1.0" encoding="UTF-8"?>
<D:multistatus xmlns:D="DAV:" xmlns:caldav="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:ical="http://apple.com/ns/ical/">
 <D:response xmlns:carddav="urn:ietf:params:xml:ns:carddav" xmlns:cm="http://cal.me.com/_namespace/" xmlns:md="urn:mobileme:davservices">
  <D:href>/caldav/v2/altostratous@gmail.com/events/</D:href>
  <D:propstat>
   <D:status>HTTP/1.1 200 OK</D:status>
   <D:prop>
    <D:displayname>altostratous@gmail.com</D:displayname>
    <D:getcontenttype>text/calendar; component=vevent</D:getcontenttype>
    <cs:getctag>63600884682</cs:getctag>
    <ical:calendar-color>#2952A3FF</ical:calendar-color>
    <caldav:calendar-description>altostratous@gmail.com</caldav:calendar-description>
    <D:resourcetype>
     <D:collection/>
     <caldav:calendar/>
    </D:resourcetype>
   </D:prop>
  </D:propstat>
 </D:response>
</D:multistatus>

0
请求日历:

PROPFIND https://apidata.googleusercontent.com/caldav/v2/altostratous@gmail.com/events/ HTTP/1.1
Authorization: Bearer ya29.Ci_5AnP1bx1kKPhytjF3axMpsMhqhYppH2RsRhgn64Nnpun8KW3Eb9PV2aT8vlsTyA
Depth: 0
Host: apidata.googleusercontent.com
Content-Type: text/xml
Content-Length: 103

<options xmlns="DAV:">
  <calendar-collection-set xmlns="urn:ietf:params:xml:ns:caldav" />
</options>
答复:

HTTP/1.1 400 Bad Request
Vary: X-Origin
Content-Type: text/xml; charset=UTF-8
Date: Mon, 06 Jun 2016 10:27:24 GMT
Expires: Mon, 06 Jun 2016 10:27:24 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alternate-Protocol: 443:quic
Alt-Svc: quic=":443"; ma=2592000; v="34,33,32,31,30,29,28,27,26,25"
Accept-Ranges: none
Vary: Origin,Accept-Encoding
Transfer-Encoding: chunked

41
<?xml version="1.0" encoding="UTF-8"?>
<D:error xmlns:D="DAV:"/>

0
HTTP/1.1400错误请求
变化:X原点
内容类型:text/xml;字符集=UTF-8
日期:2016年6月6日星期一10:27:24 GMT
到期时间:2016年6月6日星期一10:27:24 GMT
缓存控制:专用,最大年龄=0
X-Content-Type-Options:nosniff
X-Frame-Options:SAMEORIGIN
X-XSS-Protection:1;模式=块
伺服器:GSE
备选议定书:443:quic
Alt Svc:quic=“:443”;ma=2592000;v=“34,33,32,31,30,29,28,27,26,25”
接受范围:无
改变:来源,接受编码
传输编码:分块
41
0

您的VEVENT具有无效的
序列
属性:

SEQUENCE:-2147483647
如果事件是新的,则该值应为1


但主要问题是它没有
DTSTART
属性,也没有
DTEND
(或
DURATION
)属性。没有时间的活动是什么;->

您的VEVENT具有无效的
序列
属性:

SEQUENCE:-2147483647
如果事件是新的,则该值应为1

但主要问题是它没有
DTSTART
属性,也没有
DTEND
(或
DURATION
)属性。没有时间的活动是什么;->