[MGNLMAIL-16] MailAttachment uri may be set incorrectly Created: 15/Aug/13  Updated: 07/Oct/13  Resolved: 15/Aug/13

Status: Closed
Project: Magnolia Mail Module
Component/s: None
Affects Version/s: 5.0.1
Fix Version/s: 5.0.2

Type: Bug Priority: Neutral
Reporter: Mikaël Geljić Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-5168 MailAttachment uri may be set incorre... Closed
causality
duplicate
duplicates MAGNOLIA-3597 Attach a File with MailAttachment on ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Sprint: 5.1 Beta1- Frontend

 Description   

See SUPPORT-2528
On Windows environment, creating a MailAttachment from a File parameter incorrectly sets its uri to file prefix + absolute path, e.g. file://C:/...

This results in an IOException/UnknownHostException: C when sending the e-mail.

Essentially, it seems to expect the following pattern: protocol://hostname/path;
if hostname is blank it expects the third slash right away.

We may well leave uri resolution up to the client and deprecate the setPath method for setUri.


Generated at Mon Feb 12 06:02:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.