Closed Bug 219217 Opened 21 years ago Closed 21 years ago

can't send data: url attachments

Categories

(MailNews Core :: Composition, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspitzer, Assigned: sspitzer)

References

(Blocks 1 open bug)

Details

can't send data: url attachments

vCards will need this, as might that bug that mscott owns about sending BMP files.

but another bug that should be fixed by this:

1) find a page with a data url
2) dnd (or copy paste) the image into the compose window
3) send

before we fix this, we'd fail to send.

with this fix, we'll turn the data url into a mime part, as you'd expect.
the fix:

Index: compose/src/nsMsgCompUtils.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompUtils.cpp,v
retrieving revision 1.156
diff -u -w -r1.156 nsMsgCompUtils.cpp
--- compose/src/nsMsgCompUtils.cpp	5 Sep 2003 17:49:00 -0000	1.156
+++ compose/src/nsMsgCompUtils.cpp	14 Sep 2003 21:53:51 -0000
@@ -1706,7 +1706,7 @@
   nsCOMPtr<nsIIOService> pNetService(do_GetService(kIOServiceCID, &rv)); 
   if (NS_SUCCEEDED(rv) && pNetService)
   {
-    if (PL_strstr(aSpec, "://") == nsnull)
+    if (PL_strstr(aSpec, "://") == nsnull && strncmp(aSpec, "data:", 5))
     {
       //XXXjag Temporary fix for bug 139362 until the real problem(bug 70083)
get fixed
       nsCAutoString uri(NS_LITERAL_CSTRING("http://") + nsDependentCString(aSpec));
fixed.

mscott checked this in for me.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Also this fix is neat for Composer's Send Page option,
it means that the page can be sent without saving it.
Blocks: 95088
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.