From 6682a6e72ec995a75d4c78edf9816c172a1c65bc Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 28 Jun 2010 23:22:05 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 44974f9cbdca49b2868f64f007241c5a79656662 Monotone-Revision: 609fcde70ee5ebcb8ef0f4c8d578eb1e7ac74e09 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-06-28T23:22:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ SOPE/sope-patchset-r1664.diff | 13 +++++++++++++ .../Appointments/SOGoWebAppointmentFolder.m | 16 +++++++++++----- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49f6d8c0d..df4eea332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,14 @@ * SOPE/sope-patchset-r1664.diff Fixed the LF/CRLF encoding issue in NGSmtpClient.m + * SOPE/sope-patchset-r1664.diff + We now also consider https connections for WOHTTPURLHandle.m + * SoObjects/Appointments/SOGoWebAppointmentFolder.m + (-loadWebCalendar): + Modified so that we use SOPE's WOHTTPURLHandle class instead + of the NSURL code to fetch remote ICS calendars. This allow + use to support SSL by using SOPE class instead of the SSL + bundle of GNUstep (which is generally not available anywhere). 2010-06-28 Francis Lachapelle diff --git a/SOPE/sope-patchset-r1664.diff b/SOPE/sope-patchset-r1664.diff index ee094e120..dd6e4e7b9 100644 --- a/SOPE/sope-patchset-r1664.diff +++ b/SOPE/sope-patchset-r1664.diff @@ -9338,6 +9338,19 @@ Index: sope-appserver/NGObjWeb/WOCoreApplication.m if ([woport isKindOfClass:[NSNumber class]]) return woport; woport = [woport stringValue]; +Index: sope-appserver/NGObjWeb/WOHTTPURLHandle.m +=================================================================== +--- sope-appserver/NGObjWeb/WOHTTPURLHandle.m (revision 1664) ++++ sope-appserver/NGObjWeb/WOHTTPURLHandle.m (working copy) +@@ -51,7 +51,7 @@ + } + + - (id)initWithURL:(NSURL *)_url cached:(BOOL)_flag { +- if (![[_url scheme] isEqualToString:@"http"]) { ++ if (![[_url scheme] hasPrefix:@"http"]) { + NSLog(@"%s: invalid URL scheme %@ for WOHTTPURLHandle !", + __PRETTY_FUNCTION__, [_url scheme]); + RELEASE(self); Index: sope-appserver/NGObjWeb/NGHttp/NGHttpRequest.m =================================================================== --- sope-appserver/NGObjWeb/NGHttp/NGHttpRequest.m (revision 1664) diff --git a/SoObjects/Appointments/SOGoWebAppointmentFolder.m b/SoObjects/Appointments/SOGoWebAppointmentFolder.m index 067bfe484..c27c868e1 100644 --- a/SoObjects/Appointments/SOGoWebAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoWebAppointmentFolder.m @@ -1,8 +1,9 @@ /* SOGoWebAppointmentFolder.m - this file is part of SOGo * - * Copyright (C) 2009 Inverse inc. + * Copyright (C) 2009-2010 Inverse inc. * * Author: Cyril Robert + * Ludovic Marcotte * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +30,8 @@ #import "SOGoWebAppointmentFolder.h" +@class WOHTTPURLHandle; + @implementation SOGoWebAppointmentFolder - (void) deleteAllContent @@ -38,21 +41,24 @@ - (int) loadWebCalendar { - NSURL *url; - NSData *data; NSString *location, *contents; + WOHTTPURLHandle *handle; iCalCalendar *calendar; + NSData *data; + NSURL *url; + int imported = 0; location = [self folderPropertyValueInCategory: @"WebCalendars"]; url = [NSURL URLWithString: location]; if (url) { - data = [url resourceDataUsingCache: NO]; + handle = AUTORELEASE([[WOHTTPURLHandle alloc] initWithURL: url cached: NO]); + data = [handle resourceData]; if (!data && [[location lowercaseString] hasPrefix: @"https"]) { - NSLog(@"WARNING: Your GNUstep installation might not have SSL support."); + NSLog(@"WARNING: Your GNUstep/SOPE installation might not have SSL support."); return -1; }