
andrew at morphoss
Jan 4, 2012, 6:21 PM
Post #1 of 1
(397 views)
Permalink
|
|
Re: [Davical-general] trouble with external links
|
|
On Wed, 2012-01-04 at 16:22 +0100, Frank Steinberg wrote: > Today I tried to set up an "external link" like this: > > curl --basic --user 'steinb' -X BIND -H 'Content-Type: text/xml;charset="UTF-8"' --url 'https://www.ibr.cs.tu-bs.de/davical/caldav.php/steinb/' -d '<?xml version="1.0" encoding="utf-8"?><bind xmlns="DAV:"><segment>Schulferien 11-12</segment><href>http://www.sunbird-kalender.de/extension/kalender/Schulferien_2011-2012_NI.ics</href></bind>' > > This request always gave an "<bind-source-exists/>The BIND Request MUST identify an existing resource." error. After modifying the if-clause in caldav-BIND.php around line 51 that differentiates internal from external hrefs to just > > if ( preg_match ( '{^https?://[A-Za-z][^/]*/.+$}', $href ) ) { > > it seems to work as expected. Thanks Frank, The code around there looks a little baroque. I think all the other tests should be there, but we probably need to set up some intermediate "$bind_is_external" variable more carefully and then use that in the if statement. Cheers, Andrew. -- ------------------------------------------------------------------------ andrew (AT) morphoss (DOT) com +64(272)DEBIAN You will have a long and boring life. ------------------------------------------------------------------------
|