Commit Graph
176 Commits
Author SHA1 Message Date
Andrew McMillan 4f81556586 Use DeconstructURL rather than rawurldecode since it strips base_name components as well. 2012-07-09 01:17:46 +12:00
Andrew McMillan 07bce5f8bd Don't match parameterised url parts as part of collection name. 2012-07-09 01:17:42 +12:00
Andrew McMillan d6ddf8e426 Fix errors in calculated PATH_INFO. 2012-07-09 01:16:28 +12:00
Andrew McMillan f75d51284b Attempt to calculate PATH_INFO if it is not present. 2012-07-08 11:59:11 +12:00
Andrew McMillan 9898c42767 Include memory in statistics log. Option to killing current process after exceeding a memory limit. 2012-06-28 22:17:03 +12:00
Andrew McMillan 5ff5933d0c Allow a configurable path replacement regex.
This can simplify migration from .../home/... to .../calendar/...
for example.
2012-06-17 22:25:25 +12:00
Andrew McMillan 2538835a12 Seems that change to output buffer flushing is problematic with zlib. 2012-06-14 13:36:15 +12:00
Andrew McMillan 0070914394 Fix typo. 2012-05-19 10:00:33 +12:00
Andrew McMillan 33a84595a0 Merge 'Brief' header support into support for "Prefer: return-minimal"
Also reduce error noise from sending headers when output might already
have started, or trying to flush the output buffer when there isn't one.
2012-05-03 19:09:48 +12:00
Andrew McMillan 03b24c4d2f Don't log response for a 404 to reduce log noise. 2012-04-11 00:38:26 +12:00
Andrew McMillan e35db30a0d There are problems if this gets included twice, somehow. 2012-04-10 22:27:16 +12:00
Andrew McMillan 200b3a08dd Refactor checking of If-*-Match headers into a single place.
This also exposes and fixes a bug in PUT vcard where If-None-Match: "*"
was not being correctly processed.
2012-04-04 16:20:41 +12:00
Andrew McMillan 946e0719ef Changes to Depth handling. 2012-03-22 13:47:11 +13:00
Andrew McMillan 6c5f5157d6 Don't log 401 response since it's so frequent.
Also add a basic status/method/uri in front of each logged error.
2012-03-13 08:33:08 +13:00
Andrew McMillan 4e3cc98f39 Fix defaulting of Depth value for newer PHP versions. 2012-03-02 08:54:13 +13:00
Andrew McMillan f5d2b397fd Only send a Content-Length if the length is > 0 2012-02-24 11:17:54 +13:00
Andrew McMillan e9e5073eb5 Implement support for 'Brief' header.
Also add VPOLL and VAVAILABILITY to list of supported components.
2012-01-31 09:23:59 -08:00
Andrew McMillan 5b6d708ba4 Clean up content-type checking so it's not so noisy on null content. 2012-01-30 22:25:03 -08:00
Andrew McMillan b491d914ea Allow for silly programs that send content-type XML with a GET request. 2012-01-12 18:44:28 +13:00
Andrew McMillan e641ed0876 Catch missing-xml in request separately from invalid-xml. 2011-12-14 22:18:14 +13:00
Andrew McMillan f0e60b8fb2 Use supplied content_type even on zero-length requests. 2011-12-03 14:19:50 +13:00
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