2016-06-06 6 views
2

CalDAV 서버용 캘린더 클라이언트를 개발하고 있습니다. 내 응용 프로그램은 Google CalDAV와 잘 작동합니다. 나는 야후 달력에서 캘린더를 얻으려고하고있다. 잘못된 요청 오류를 일으키는 요청에 어떤 문제가 있습니까?Yahoo CalDAV : 캘린더 받기 요청이 잘못되었습니다.

얻기 옵션 요청 :

OPTIONS https://caldav.calendar.yahoo.com/dav/aliasgarikh/Calendar/testcalendar HTTP/1.1 
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
Host: caldav.calendar.yahoo.com 
Content-Length: 0 
Connection: Keep-Alive 

얻기 옵션 응답 :

HTTP/1.1 200 OK 
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 20:11:56 GMT 
WSHost: tardis018.cal.bf1.yahoo.com 
DAV: 1, 3, access-control, extended-mkcol, calendar-access 
MS-Author-Via: DAV 
Allow: MKCOL, REPORT, MOVE, COPY, HEAD, POST, GET, DELETE, MKCALENDAR, ACL, PROPFIND, OPTIONS, PROPPATCH, PUT 
Content-Length: 0 
Date: Mon, 06 Jun 2016 20:11:55 GMT 
Server: ATS 
Age: 1 
Connection: keep-alive 
Via: http/1.1 calgate116.cal.ne1.yahoo.com (ApacheTrafficServer) 

얻기 달력 요청 :

PROPFIND https://caldav.calendar.yahoo.com/dav/aliasgarikh/Calendar/testcalendar HTTP/1.1 
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 
Depth: 0 
Host: caldav.calendar.yahoo.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 
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 20:11:57 GMT 
WSHost: tardis041.cal.bf1.yahoo.com 
Cache-Control: must-revalidate,no-cache,no-store 
Content-Type: text/html;charset=utf-8 
Content-Length: 3190 
Vary: Accept-Encoding 
Date: Mon, 06 Jun 2016 20:11:56 GMT 
Server: ATS 
Age: 2 
Connection: keep-alive 
Via: http/1.1 calgate116.cal.ne1.yahoo.com (ApacheTrafficServer) 

<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
<head> 
    <title>Yahoo! - Error report</title> 
    <style> 
     /* nn4 hide */ /*/*/ 
     body { 
     font: small/ 1.2em arial, helvetica, clean, sans-serif; 
     font: x-small; 
     text-align: center; 
     } 

     table { 
     font-size: inherit; 
     font: x-small; 
     } 

     html>body { 
     font: 83%/ 1.2em arial, helvetica, clean, sans-serif; 
     } 

     input { 
     font-size: 100%; 
     vertical-align: middle; 
     } 

     p,form { 
     margin: 0; 
     padding: 0; 
     } 

     p { 
     padding-bottom: 6px; 
     margin-bottom: 10px; 
     } 

     #doc { 
     width: 48.5em; 
     margin: 0 auto; 
     border: 1px solid #fff; 
     text-align: center; 
     } 

     #ygma { 
     text-align: right; 
     margin-bottom: 53px 
     } 

     #ygma img { 
     float: left; 
     } 

     #ygma div { 
     border-bottom: 1px solid #ccc; 
     padding-bottom: 8px; 
     margin-left: 152px; 
     } 

     #bd { 
     clear: both; 
     text-align: left; 
     width: 75%; 
     margin: 0 auto 20px; 
     } 

     h1 { 
     font-size: 135%; 
     text-align: center; 
     margin: 0 0 15px; 
     } 

     legend { 
     display: none; 
     } 

     fieldset { 
     border: 0 solid #fff; 
     padding: .8em 0 .8em 4.5em; 
     } 

     form { 
     position: relative; 
     background: #eee; 
     margin-bottom: 15px; 
     border: 1px solid #ccc; 
     border-width: 1px 0; 
     } 

     #s1p { 
     width: 15em; 
     margin-right: .1em; 
     } 

     form span { 
     position: absolute; 
     left: 70%; 
     top: .8em; 
     } 

     form a { 
     font: 78%/ 1.2em arial; 
     display: block; 
     padding-left: .8em; 
     white-space: nowrap; 
     background: url(http://l.yimg.com/a/i/s/bullet.gif) 
     no-repeat left center; 
     } 

     form .sep { 
     display: none; 
     } 

     .more { 
     text-align: center; 
     } 

     #ft { 
     padding-top: 10px; 
     border-top: 1px solid #999; 
     } 

     #ft p { 
     text-align: center; 
     font: 78% arial; 
     } 
     /* end nn4 hide */ 
    </style> 
</head> 
<body> 
<div id="doc"> 
    <div id="ygma"> 
     <a href="http://www.yahoo.com"> 
      <img src="http://l.yimg.com/a/i/yahoo.gif" width="147" 
       height="31" border="0" alt="Yahoo!"> 
     </a> 

     <div> 
      <a href="http://www.yahoo.com">Yahoo!</a> 
      - <a href="http://help.yahoo.com">Help</a> 
     </div> 
    </div> 
    <div id="bd"> 
     <h1>HTTP Status 400 - Error:400</h1> 

     <p> 
      <b>type</b> 
      Status report 
     </p> 

     <p> 
      <b>message</b> 
      <u>Error:400</u> 
     </p> 

     <p> 
      <b>description</b> 
      <u>The request sent by the client was syntactically incorrect.</u> 
     </p> 

     <p> 

     </p> 
    </div> 
</div> 
</body> 
</html> 

답변

3

PROPFIND 요청은 완전히 유효하지 않습니다. PROPFIND 요청의 페이로드 (주어진 경우)는 DAV:propfind 루트 요소가 있어야합니다. calendar-home-set을 검색하기위한 유효한 요청은 RFC 4791, section 8.4을 참조하십시오.

Google과 함께 작동하는 유일한 이유는 서버가 다소 관용적 인 것처럼 보이고 어떤 종류의 기본 응답을 반환하기 때문입니다 (사용자가 메시지 본문을 보내지 않으면 응답하는 것과 비슷합니다).