Skip to content

Commit 2947967

Browse files
authored
Get HTTP semantics correct: always set Vary: User-Agent
1 parent 6db53de commit 2947967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/yahrzeit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ export async function yahrzeitDownload(ctx) {
454454
if (query.i === 'on') {
455455
icalOpt.location = Location.lookup('Jerusalem');
456456
} else if (ctx.get('user-agent') === 'Google-Calendar-Importer') {
457-
ctx.set('Vary', 'User-Agent');
458457
icalOpt.location = Location.lookup('New York');
459458
}
460459
const zeroEvents = events.length === 0;
@@ -466,6 +465,7 @@ export async function yahrzeitDownload(ctx) {
466465
for (const icalEv of icals) {
467466
icalEv.locationName = undefined;
468467
}
468+
ctx.set('Vary', 'User-Agent');
469469
ctx.body = await icalEventsToString(icals, icalOpt);
470470
} else if (extension == '.csv') {
471471
const euro = Boolean(query.euro);

0 commit comments

Comments
 (0)