The default bug view has changed. See this FAQ.

ICS provider should use Accept: text/calendar on GET

RESOLVED FIXED in 4.0.0.1

Status

Calendar
Provider: ICS/WebDAV
RESOLVED FIXED
10 years ago
2 years ago

People

(Reporter: Bruno Browning, Assigned: marlio, Mentored)

Tracking

unspecified
4.0.0.1

Details

(Whiteboard: [good first bug][lang=js])

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

10 years ago
In an email of 14 September bernard at oracle requested:

For calendars configured "On the Network" in Format
   "iCalendar (ICS)" Lightning issue an HTTP GET request
   with the following request header:

      Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

   Could Lightning specify the following value instead?

      Accept: text/calendar
(Reporter)

Comment 1

10 years ago
Taking this. The Accept: header probably should actually be "text/calendar; charset=utf-8", and we should properly set the Accept-Charset: header as well.
Status: NEW → ASSIGNED
(Reporter)

Updated

10 years ago
Assignee: nobody → browning
Status: ASSIGNED → NEW
(Reporter)

Comment 2

10 years ago
Created attachment 281300 [details] [diff] [review]
set headers

tested w/ http:// and file:///; I want to test against ftp:// before requesting review.
Bruno, could you please provide an update on the status of this patch/bug?
Bruno, do you want to ask for review for the patch? Do we need the "; charset=utf-8" part if we specify a separate Accept-Charset header?
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All

Comment 5

9 years ago
Actually, you can't specify ";charset=utf-8" in the Accept request header.
The semi-colon is used to separate the "media-range" from the "accept-params".
See: http://tools.ietf.org/html/rfc2616#section-14.1

Thanks!
Bernard
(Reporter)

Comment 6

9 years ago
Created attachment 340799 [details] [diff] [review]
patch rev 2
Attachment #340799 - Flags: review?(daniel.boelzle)
Comment on attachment 340799 [details] [diff] [review]
patch rev 2

>-        channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
>-        channel.notificationCallbacks = this;
>+        this.prepareChannel(channel);
> 
>         var downloader = Components.classes["@mozilla.org/network/downloader;1"]
>                                    .createInstance(CI.nsIDownloader);
...

This will add the etag check to the backup download, but I don't see 304 handled in that code. As far as I see this may lead to empty backups.
Attachment #340799 - Flags: review?(daniel.boelzle) → review-
Attachment #281300 - Attachment is obsolete: true
Bernard, is this still an issue? Requesting text/calendar might be more correct, but for servers that serve such files as text/plain we break interop.

Comment 9

6 years ago
Philipp,

How about using the following?

Accept: text/calendar,text/plain;q=0.8,*/*;q=0.5
Sounds good to me. We'd have to find out what happens if there is no accepted content type and display the right kind of error. Now we just need someone to put up a patch ;-)
Whiteboard: [good first bug]
Assignee: browning → nobody
Mentor: philipp@bugzilla.kewis.ch
Whiteboard: [good first bug] → [good first bug][lang=js]
Status: ASSIGNED → NEW
(Assignee)

Comment 11

2 years ago
Created attachment 8565562 [details] [diff] [review]
AcceptHeaders_V1.patch
Attachment #8565562 - Flags: review?(philipp)
Comment on attachment 8565562 [details] [diff] [review]
AcceptHeaders_V1.patch

Review of attachment 8565562 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, r=philipp
Attachment #8565562 - Flags: review?(philipp) → review+
(Assignee)

Updated

2 years ago
Assignee: nobody → malinthak2
Status: NEW → ASSIGNED
(Assignee)

Comment 13

2 years ago
Created attachment 8565578 [details] [diff] [review]
AcceptHeaders.patch

Adding patch headers
Attachment #8565562 - Attachment is obsolete: true
Attachment #8565578 - Flags: checkin?(philipp)
Attachment #8565578 - Flags: checkin?(philipp)
Keywords: checkin-needed

Updated

2 years ago
Attachment #340799 - Attachment is obsolete: true

Comment 14

2 years ago
Comment on attachment 8565578 [details] [diff] [review]
AcceptHeaders.patch

Please mark r- patches as obsolete and patches to be checked in as r+ in the future. That makes handling checkin-needed easier. Thanks!
Attachment #8565578 - Flags: review+

Comment 15

2 years ago
https://hg.mozilla.org/comm-central/rev/a6ce5db74705

Updated

2 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 4.0
You need to log in before you can comment on or make changes to this bug.