155 Commits

Author SHA1 Message Date
Andrew McMillan
b50b2d82ea Force output buffers to be flushed, if they're turned on.
If output buffering is turned on, PHP can be a bit slack about sending
the data to the client before closing the connection with exit(). These
changes ensure we call ob_flush() before we leave.  We call @ob_flush()
so we don't get noisy warnings when output buffering is off...
2011-11-02 18:43:10 +13:00
Andrew McMillan
2fd4a95285 Force casting to text in case someone is using integer usernames. 2011-10-14 11:07:33 +13:00
Andrew McMillan
1327fee9a8 Fix wrong array reference. 2011-10-10 22:26:33 +02:00
Andrew McMillan
ce77dae043 Fail more gracefully on crap encoding input. 2011-10-07 08:27:02 +02:00
Andrew McMillan
0db1fed1de Fix handling where supplied content-type header is busted. 2011-10-06 11:05:15 +02:00
Andrew McMillan
850baa0dbf Support gzip/deflate/compress encoding of incoming entity for PUT etc. 2011-10-05 09:41:00 +02:00
Andrew McMillan
bcb1710d3c Add 'helpful' support for content-encoding on PUT for Helge :-) 2011-10-04 16:17:19 +02:00
Andrew McMillan
6f8e2b1d6e Strip any protocol/host/port part from a MOVE Destination. 2011-09-11 00:45:29 +12:00
Andrew McMillan
c6a1451f14 Fix unassigned variable warning. 2011-09-09 22:53:03 +12:00
Andrew McMillan
b4dfa9c1bf Rewriting some TODO comments as @todo 2011-08-26 01:03:13 +12:00
Andrew McMillan
a8024d2633 Fix XML output of <error> block. 2011-08-23 10:47:00 +12:00
Andrew McMillan
d83d7a0ef2 Fix raw_post handling for other front-ends.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-04-03 21:34:59 +12:00
Andrew McMillan
1816d313bd Move header logging from CalDAVRequest to caldav.php
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-04-03 20:38:23 +12:00
Andrew McMillan
0f8f221788 Cosmetic.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-04-01 18:02:01 +13:00
Andrew McMillan
fafa2662b2 Move supported privileges into a private static function, rather
than assign the array in every instance of CalDAVRequest.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-04 16:59:03 +13:00
Andrew McMillan
20ee255898 Refactor fetching of Principal records from database.
This is a significant refactoring, replacing the old getUserBy*()
functions with a new Principal class, and replacing the old
CalDAVPrincipal class with a new DAVPrincipal class which extends
the Principal class.

At this point all regression tests pass (again) but there could
well be issues for people who use alternative authenticators
such as LDAP, although I have endeavoured to resolve those
potential issues.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-03 10:16:43 +13:00
Andrew McMillan
4178ab4254 Add caching of collection reads
Also a special header is added for telling DAViCal to flush the
cache during regression testing etc.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-01 21:25:46 +13:00
Andrew McMillan
4380fb12c9 Hide authorization headers in logging.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2010-11-30 12:36:40 +13:00
Andrew McMillan
89f28302dd Leave the quotes around the ETag we receive for comparison. 2010-09-25 22:07:21 +12:00
Andrew McMillan
7ab8a3a3bb Uncomment the addressbook-query report. 2010-09-14 13:51:28 +12:00
Andrew McMillan
a38c0e33cb Comments only. 2010-08-30 16:59:52 +12:00
Andrew McMillan
64f20edaab Coerce the content-type on PUT.
It seems that failing to correctly set the content-type header
on PUT is a common error.
2010-08-29 13:01:56 +12:00
Andrew McMillan
766e825f99 Forece content-type in some circumstances.
If the method is REPORT or PROPFIND it won't be valid if they
didn't send XML, so assume they did, with a warning.

Otherwise, if the content-type is XML, but they sent less than
7 bytes, assume that it has no content-type.
2010-06-28 08:39:39 +12:00
Andrew McMillan
8f22d87a82 Fix if_addressbook for / 2010-05-12 22:12:43 +12:00
Andrew McMillan
8223e2e9f7 Replace deprecated split() calls. 2010-04-26 19:46:23 +12:00
Andrew McMillan
0718aa5352 Log the response regardless, if it is status 400 or greater. 2010-04-19 23:28:13 +12:00
Andrew McMillan
860a3098ea Add some statistical logging for script/database execution times. 2010-03-30 10:43:22 +13:00
Andrew McMillan
a2c3c4a620 Add support for arbitray text objects in collections. 2010-03-29 22:38:45 +13:00
Andrew McMillan
fdfb20b14b Remove any expired locks before testing if a lock is active. 2010-03-29 12:37:58 +13:00
Andrew McMillan
88c57486d9 Load the content_type into an internal variable. 2010-03-29 12:37:32 +13:00
Andrew McMillan
83e0324d96 Provide a more useful error output on an XML parser failure. 2010-03-20 01:04:30 +13:00
Andrew McMillan
0a1b3c2d59 All regression tests passing again with BIND for PROPFIND. 2010-03-14 12:16:12 +13:00
Andrew McMillan
f78655e952 Fixing up various minor regressions after restructuring PROPFIND. 2010-03-14 01:48:55 +13:00
Andrew McMillan
92355af6f6 Fix incorrect reference in PreconditionFailed() method. 2010-03-14 00:21:43 +13:00
Andrew McMillan
31e766c368 Migrate CalDAVRequest to AwlQuery. 2010-03-12 09:47:01 +13:00
Andrew McMillan
606e7d6338 Move PreconditionFailed and MalformedRequest into $request methods. 2010-03-07 20:58:31 +13:00
Andrew McMillan
c6745c97b0 Tickets now working for PROPFIND requests, and maybe more... 2010-03-06 23:30:12 +13:00
Andrew McMillan
3320ec9a17 Start adding ticket support into request processing. 2010-03-06 00:22:09 +13:00
Andrew McMillan
1e717bf1fe Check we have actually got an XML body if we got a content-type XML. 2010-03-05 12:25:09 +13:00
Andrew McMillan
544a3949fc Minor formatting tweak. 2010-02-24 16:25:50 +13:00
Andrew McMillan
38d1d430a5 Strip redundant code from CalDAVRequest 2009-12-27 14:16:09 +13:00
Andrew McMillan
d7c004c85f Switch privileges to use the new model. 2009-12-27 09:44:45 +13:00
Andrew McMillan
ee45ccbd1e Fix implementation of need-privileges. 2009-12-26 11:52:44 +13:00
Andrew McMillan
9eb76822ce Fix cut and paste error. 2009-12-26 11:23:30 +13:00
Andrew McMillan
ebbec96269 Add NeedPrivilege() method to DAVResource and simplify request method. 2009-12-26 11:19:21 +13:00
Andrew McMillan
fe2db77266 Add a NeedPrivilege($href,$privilege) to build an error response. 2009-12-26 00:18:46 +13:00
Andrew McMillan
b76a9a6059 Make the supported-privilege-set response to match the new privileges. 2009-12-26 00:17:59 +13:00
Andrew McMillan
b15b589b90 Correct response to supported-report-set property. 2009-12-24 21:37:29 +13:00
Andrew McMillan
3cb5a13acd Advertise support for ACL method. 2009-12-23 23:32:35 +13:00
Andrew McMillan
9ecc95399b Force function parameter types for older PostgreSQL versions. 2009-12-21 22:18:54 +13:00