caldav-adapter 8.2.6 → 8.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "caldav-adapter",
3
3
  "description": "CalDAV server for Node.js and Koa. Modernized and maintained for Forward Email.",
4
- "version": "8.2.6",
4
+ "version": "8.2.7",
5
5
  "author": "Sanders DeNardi and Forward Email LLC",
6
6
  "contributors": [
7
7
  "Sanders DeNardi <sedenardi@gmail.com> (http://www.sandersdenardi.com/)",
@@ -53,10 +53,11 @@ module.exports = function (options) {
53
53
  return build(multistatus([responseObj]));
54
54
  }
55
55
 
56
- // text/calendar
57
- // application/ics
58
- // text/x-vcalendar
59
- // application/octet-stream
56
+ // Return raw iCalendar with proper headers
57
+ ctx.status = 200;
58
+ ctx.remove('DAV');
59
+ ctx.set('Content-Type', 'text/calendar; charset=utf-8');
60
+ ctx.set('ETag', options.data.getETag(ctx, calendar));
60
61
  return ics;
61
62
  }
62
63
 
@@ -89,10 +90,11 @@ module.exports = function (options) {
89
90
  return build(multistatus([responseObj]));
90
91
  }
91
92
 
92
- // text/calendar
93
- // application/ics
94
- // text/x-vcalendar
95
- // application/octet-stream
93
+ // Return raw iCalendar with proper headers
94
+ ctx.status = 200;
95
+ ctx.remove('DAV');
96
+ ctx.set('Content-Type', 'text/calendar; charset=utf-8');
97
+ ctx.set('ETag', options.data.getETag(ctx, calendar));
96
98
  return ics;
97
99
  };
98
100