After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 547260 - CalDAV plugin doesn't correctly understand HTTP response "301 Moved Permanently"
CalDAV plugin doesn't correctly understand HTTP response "301 Moved Permanently"
Status: RESOLVED DUPLICATE of bug 537718
Product: evolution
Classification: Applications
Component: Calendar
unspecified
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
evolution[caldav]
Depends on:
Blocks:
 
 
Reported: 2008-08-11 09:09 UTC by Romain LE DISEZ
Modified: 2009-02-06 09:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Romain LE DISEZ 2008-08-11 09:09:23 UTC
I'm running Evolution 2.22.3.1 on Gnome 2.22.3 (on Fedora 9).

I installed Apple Calendar Server [1] on Debian Etch. It works well with Apple iCal (caldav client of Mac OS X), and Thunderbird with the plugin "Lightning" [2].

On Evolution, I can add the calendar and create events. The events created with Evolution appear on iCal and Thunderbird but the ones created in iCal or Thunderbird don't appear in Evolution. If I accede the calendar with another instance of Evolution (eg: on an other computer), I can't see any events (even the ones created with Evolution)

So I ran tcpdump to look what was wrong. I think that on the step 5, Evolution should re-do the REPORT with the correct location (like OPTIONS on step 2). If I telnet to port 8008 and type the REPORT with the correct location, I get the good data.

Here is a light version of the dump. I can provide the PCAP file if needed, there is nothing secret in it because it's just a test server.

The calendar URL configured in Evolution: caldav://localhost:8008/calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/

1. =====================================================================

OPTIONS /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46 HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3

HTTP/1.1 301 Moved Permanently
Location: /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/


2. =====================================================================

OPTIONS /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/ HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3

HTTP/1.1 401 Unauthorized
DAV: 1, access-control, calendar-access, calendar-schedule, calendar-availability, inbox-availability, calendar-proxy, calendarserver-private-events
WWW-Authenticate: digest nonce="11075656089721203661398562506", realm="Test Realm", algorithm="md5"
WWW-Authenticate: basic realm="Test Realm"


3. =====================================================================

OPTIONS /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/ HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3
Authorization: Basic averysecretstring

HTTP/1.1 200 OK
DAV: 1, access-control, calendar-access, calendar-schedule, calendar-availability, inbox-availability, calendar-proxy, calendarserver-private-events
ETag: "6810020-400-489F57D8"
Allow: ACL, COPY, DELETE, GET, HEAD, LOCK, MKCALENDAR, MKCOL, MOVE, OPTIONS, PROPFIND, PROPPATCH, PUT, REPORT, TRACE, UNLOCK


4. =====================================================================

REPORT /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46 HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3
Depth: 1
Content-Type: application/xml
Content-Length: 255

<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
    ...
</C:calendar-query>

HTTP/1.1 301 Moved Permanently
Location: /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/


5. =====================================================================

OPTIONS /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46 HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3

HTTP/1.1 301 Moved Permanently
Location: /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/


6. =====================================================================

OPTIONS /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/ HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3
Authorization: Basic averysecretstring

HTTP/1.1 200 OK
DAV: 1, access-control, calendar-access, calendar-schedule, calendar-availability, inbox-availability, calendar-proxy, calendarserver-private-events
ETag: "6810020-400-489F57D8"
Allow: ACL, COPY, DELETE, GET, HEAD, LOCK, MKCALENDAR, MKCOL, MOVE, OPTIONS, PROPFIND, PROPPATCH, PUT, REPORT, TRACE, UNLOCK


7. =====================================================================

REPORT /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46 HTTP/1.1
Host: localhost:8008
User-Agent: Evolution/2.22.3
Depth: 1
Content-Type: application/xml
Content-Length: 255

<C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
    ...
</C:calendar-query>

HTTP/1.1 301 Moved Permanently
Location: /calendars/users/romain/21991115-BA50-48D3-8D97-D92845C2BD46/




--
[1] http://trac.calendarserver.org/
[2] http://www.mozilla.org/projects/calendar/releases/lightning0.8.html
Comment 1 Romain LE DISEZ 2008-08-11 14:41:19 UTC
A quick hack for sysadmins. In apache, as a reverse proxy :

<VirtualHost *:80>
        ServerName caldav.mydomain.com

        RewriteEngine on
        RewriteCond %{REQUEST_URI} !\.ics$
        RewriteRule ^/evolution/(.*)([^/])$ /$1$2/ [PT,L]
        RewriteRule ^/evolution/(.*)$ /$1 [PT,L]

        ProxyPass / http://localhost:8008/
        ProxyPassReverse / http://localhost:8008/
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>

        ErrorLog /var/log/apache2/caldav.mydomain.com-error.log
        CustomLog /var/log/apache2/caldav.mydomain.com-access.log combined
</VirtualHost>


With this hack, if you put /evolution/ at the beginning of the URL, apache will automaticaly add the ending slash before passing it to Calendar Server.
Comment 2 André Klapper 2008-08-30 16:53:07 UTC
evolution-caldav is not worked on anymore.
Its functionality has been completely migrated to evolution itself, hence moving all open bugs to Evolution itself.
Comment 3 Milan Crha 2009-02-06 09:37:06 UTC
Redirections has been done within bug #537718, thus I'm marking this as a duplicate. It's included in sources since 2008-09-23, and is part of Evolution 2.24.

*** This bug has been marked as a duplicate of 537718 ***