Closed Bug 462026 Opened 11 years ago Closed 11 years ago

301 and 302 redirects not done properly with caldav provider


(Calendar :: Provider: CalDAV, defect)

Not set


(Not tracked)



(Reporter: nomisvai, Assigned: Fallen)



(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008092417 Firefox/3.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080917 Sunbird/0.9

If a server responds with a 301 or 302 response code, the client will do a GET http method instead of the previously redirected method.

To reproduce you can try a http:// connection to our hosted server ( it should redirect to https:// of the same url.

Reproducible: Always

Steps to Reproduce:
I believe we need to resetup the channel in case of a redirect, I think we forgot to do that when fixing the original bug. Will look into this.
Assignee: nobody → philipp
Ever confirmed: true
Flags: blocking-calendar1.0+
Attached patch Fix - v1 β€” β€” Splinter Review
After a lot of sweat and blood, I was finally able to find all problems regarding redirection.

Since the most common use of 3xx redirects is to redirect from http -> https, we might want to actually change the internal URL in case that is the only change to reduce the number of requests done, but I'll leave this to a different bug.
Attachment #345304 - Flags: review?(daniel.boelzle)
Comment on attachment 345304 [details] [diff] [review]
Fix - v1

the patch looks good, athough I haven't tested it; r=dbo

I am wondering if ics/gdata/wcap would benefit from such a fix, too?
Attachment #345304 - Flags: review?(daniel.boelzle) → review+
GData already takes care of redirects but in a different way. Not sure if/how wcap does so. A helper in calProviderUtils.js might be a good idea, with a list of headers to copy.

Pushed to comm-central <>

Closed: 11 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Anybody knows about ics?
Philipp, could you write a follow-up bug or should we use this one to complete the works w.r.t. ics/wcap?
ICS seems to work out of the box. I don't have a wcap server that redirects to test this.
What about using a proxy server? cal-emea uses https.
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.