name parameter for content-type for attachments should be last
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evolution |
Fix Released
|
Medium
|
|||
evolution (Ubuntu) |
Invalid
|
Low
|
Ubuntu Desktop Bugs | ||
evolution-data-server (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
To work around broken servers which assume that the name parameter should come last when there is a file name present in the Content-Type header (and the server does not use the Content-Disposition header), the name parameter should come last. For example:
Content-
Content-
Content-Type: text/x-java; name=Checkpoint
Should really be:
Content-
Content-
Content-Type: text/x-java; charset=UTF-8; name=Checkpoint
In the case of this particular attachment, the message was processed improperly by the server and came back with:
Content-Type: text/x-java; name="Checkpoin
Content-
Content-
This is, in particular, to work around a bug in the NNTP gateway in the Jive Forums software. There may be other server-side implementations which make this dangerous assumption, though, as well, and it would be well to work around those, too.
I cannot find where in the Evolution sources to make this change, because I don’t know C that well, and I have a hard time trying to figure out what any component of the rather large source base is doing at any single point. I would be submitting a patch if I could figure out where to fix the problem.
Changed in evolution: | |
status: | Unknown → New |
Changed in evolution: | |
assignee: | nobody → desktop-bugs |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in evolution-data-server: | |
assignee: | nobody → desktop-bugs |
importance: | Undecided → Low |
status: | New → Triaged |
Changed in evolution: | |
status: | New → Fix Released |
Changed in evolution: | |
importance: | Unknown → Medium |
This is a (very bad) workaround which I used to try to find the root of the problem.
I say that this is a very bad workaround, because it simply refuses to send a charset parameter for text/x-java files (and anything other than text/plain, which seemed like a good test case for me since I am not sending text/plain attachments in this situation). This patch SHOULD NOT BE USED by anyone other than to confirm that this works around the problem in the description.
It looks like that the real workaround would have to be to modify evolution- data-server, file camel/camel- mime-utils. c, function camel_header_ param_list_ format_ append( ), such that it caches the name= parameter when present and appends it last, when there are multiple parameters passed to it for formatting. In light of this finding, I am going to add EDS to the affected packages momentarily.