Closed
Bug 302213
Opened 19 years ago
Closed 19 years ago
Embedded mailto: URLs are broken in mail
Categories
(MailNews Core :: Networking, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.8beta4
People
(Reporter: stephend, Assigned: bzbarsky)
References
Details
(Keywords: regression)
Attachments
(1 file)
3.61 KB,
patch
|
Bienvenu
:
review+
darin.moz
:
superreview+
shaver
:
approval1.8b4+
|
Details | Diff | Splinter Review |
Build ID: 2005-07-26-05, Windows XP SeaMonkey trunk. Not sure if your checkin to bug 244964 merely exposed an underlying problem, or if it broke this outright... Summary: Embedded mailto: URLs are broken in mail. Steps to Reproduce: 1. Click on any <a href="mailto:blah@blah.com"> link in mail. Actual Results: The file "blah@blah.com" is of type application/x-java-applet;jpi-version=1.5.0_04, and SeaMonkey does not know how to handle this file type. This file is located at: mailto: What should SeaMonkey do with this file? * Open it with the default application * Open it with ________________ Choose... * Save it to disk [ ] Always perform this action when handling files of this type Expected Results: Just launch a mail compose window.
Assignee | ||
Comment 1•19 years ago
|
||
Stephen, what makes you think this has anything to do with the checkin for bug 244964?
Reporter | ||
Comment 2•19 years ago
|
||
[12:15] <DavidBienvenu> yup [12:15] <DavidBienvenu> I updated in netwerk, and now I can't do mailto links - Thx, Stephen! :-)
Assignee | ||
Comment 3•19 years ago
|
||
So the problem is that the mailto protocol handler creates an input stream channel as follows: 357 return NS_NewInputStreamChannel(_retval, aURI, pipeIn, 358 NS_LITERAL_CSTRING("x-application-mailto")); That's not a valid content-type (no '/' in it). NS_ParseContentType used to not care and just set that as the type; the new code, just like the old HTTP header code, ignores the bogus type. So a wallpaper fix would be to use something like "application/x-mailto" instead. The real fix would be to not use a fake type here at all -- as things stand a site can cause a mail compose window to pop up by just returning data with the "right" content type. Is there a reason not to open the compose window from AsyncOpen (with an appropriate channel impl, of course)?
Assignee | ||
Comment 4•19 years ago
|
||
Actually, I was wrong. It's even worse. Mailnews will actually throw on non-mailto: URIs that happen to have the type it's using, which ends up with no feedback for the user as to why their click did nothing... So once we fix this, I'll definitely file a followup but for mailnews to stop using a type here.
Comment 5•19 years ago
|
||
> site can cause a mail compose window to pop up by just returning data with the > "right" content type. of course they can also do location.href="mailto:foo@bar.com"...
Comment 6•19 years ago
|
||
and the code does have the maybe nice feature that asyncOpen has no
side-effects. so things like wbp should not trigger opening of compose windows.
which might the reason why it's implemented as is, re:
> Is there a reason not to open the compose window from
> AsyncOpen (with an appropriate channel impl, of course)?
Assignee | ||
Comment 7•19 years ago
|
||
> so things like wbp should not trigger opening of compose windows.
True, but we need to fix that for various other protocols anyway, at which point
mailto: should just use the "no data" protocol flag and stop doing what it does now.
Component: Networking: HTTP → MailNews: Networking
Assignee | ||
Comment 8•19 years ago
|
||
Attachment #190597 -
Flags: superreview?(darin)
Attachment #190597 -
Flags: review?(bienvenu)
Comment 9•19 years ago
|
||
Comment on attachment 190597 [details] [diff] [review] Proposed fix thanks, Boris.
Attachment #190597 -
Flags: review?(bienvenu) → review+
Comment 10•19 years ago
|
||
Comment on attachment 190597 [details] [diff] [review] Proposed fix A #define for the mime type would be nice, but this works. sr=darin
Attachment #190597 -
Flags: superreview?(darin) → superreview+
Assignee | ||
Comment 11•19 years ago
|
||
Comment on attachment 190597 [details] [diff] [review] Proposed fix Requesting approval for simple regression fix.
Attachment #190597 -
Flags: approval1.8b4?
Comment on attachment 190597 [details] [diff] [review] Proposed fix a=shaver
Attachment #190597 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 13•19 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta4
Reporter | ||
Comment 14•19 years ago
|
||
Verified FIXED using build 2005-07-27-05 on Windows XP SeaMonkey trunk.
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 15•19 years ago
|
||
Filed followup bug 302661
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•