-----Ursprüngliche Nachricht----- Von: gaz...@web.de Gesendet: Nov 29, 2011 3:53:10 PM An: users@sogo.nu Betreff: [SOGo] ical4j GETs 501 when checking for existence of a calendar
>Gentlemen, > >I am trying to access a calendar of the user gazda using ical4j 1.0.1 Java >client library. >The SOGo instance I am accessing is version 1.3.9. > >Here is the piece of java code: > >CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_UNFOLDING, >true); > >CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, >true); > >CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_VALIDATION, >true); > URL url = new URL("https", "sogo.mycompany.com", -1, "/"); > CalDavCalendarStore store = new >CalDavCalendarStore("-//MacTI//WOCal//EN", url, new PathResolver() { > @Override > public String getPrincipalPath(String username) { > return "/SOGo/dav/" + username + "/"; > } > @Override > public String getUserPath(String username) { > return "/SOGo/dav/" + username + "/"; > }); > store.connect("gazda", "********".toCharArray()); > > CalDavCalendarCollection col = >store.getCollection("/SOGo/dav/gazda/Calendar/personal/"); > >The problem is that store.getCollection() internally tries to check if the >collection exists with a GET request which fails. Here is the relevant piece of >SOGo log: > >192.168.0.1 - - [29/Nov/2011:10:53:41 GMT] "PROPFIND /SOGo/dav/gazda/ HTTP/1.1" >401 0/90 0.013 - - 0 >192.168.0.1 - - [29/Nov/2011:10:53:41 GMT] "PROPFIND /SOGo/dav/gazda/ HTTP/1.1" >207 593/90 0.011 - - 0 >192.168.0.1 - - [29/Nov/2011:10:53:41 GMT] "GET >/SOGo/dav/gazda/Calendar/personal/ HTTP/1.1" 401 0/0 0.005 - - 0 >192.168.0.1 - - [29/Nov/2011:10:53:41 GMT] "GET >/SOGo/dav/gazda/Calendar/personal/ HTTP/1.1" 501 191/0 0.013 - - 0 > >The question is: Who is wrong? ical4j using GET or SOGo replying 501? > >The whole thing works if I comment out the GET request in the ical4j code. > >Thanks in advance, > >Gazda >-- >users@sogo.nu >https://inverse.ca/sogo/lists I am replying myself with some more info: As discussed in http://sourceforge.net/projects/ical4j/forums/forum/368291/topic/4855559/index/page/1 the RFC does not seem to stipulate how the existence of a collection should be tested. However there came an advice from the ietf-caldav mailing list to use PROPFIND for that purpose. ical4j will probably be patched accordingly. Anyway, with the GET request there seems to be something out of order on SOGo. I have performed some tests with curl with following results: (1) For /SOGo/dav/nosuch/Calendar/personal/ which does not exist I am getting 404 for all of PROPFIND, OPTIONS and GET which is expected. (2) But for /SOGo/dav/gazda/Calendar/personal/ which exists I am getting 207 for PROPFIND 200 for OPTIONS 501 for GET May I file a bug for this? Best, Gazda ___________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 -- users@sogo.nu https://inverse.ca/sogo/lists