File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,11 @@ module.exports = function (options) {
5353 return build ( multistatus ( [ responseObj ] ) ) ;
5454 }
5555
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 ) ) ;
6061 return ics ;
6162 }
6263
@@ -89,10 +90,11 @@ module.exports = function (options) {
8990 return build ( multistatus ( [ responseObj ] ) ) ;
9091 }
9192
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 ) ) ;
9698 return ics ;
9799 } ;
98100
You can’t perform that action at this time.
0 commit comments