[rt-users] Broken attachements -- possibly not mod_perl2

mixo mixo at coza.net.za
Wed Nov 12 02:59:22 EST 2003


I just imported data in to rt 3.0.4 and SOME attachments appeared to be 
truncated at 9 bytes.
All attachemts that are jpegs seem to be truncated, but  not word docs 
and other types. This
lead me to check the size of  attachments in the database of ticket 
6730. Here is what I found:

 From the "Transactions" table I found:
++++++++Transactions+++++++++++
mysql> select id,Type,Field,Created from Transactions where Ticket=6730 
order by id;
+-------+------------+--------+---------------------+
| id    | Type       | Field  | Created             |
+-------+------------+--------+---------------------+
| 31531 | Create     | NULL   | 2001-12-20 08:47:22 |
| 31544 | Set        | Queue  | 2001-12-20 08:52:25 |
| 31545 | Status     | Status | 2001-12-20 08:52:26 |
| 31546 | Give       | Owner  | 2001-12-20 08:52:42 |
| 31556 | Comment    | NULL   | 2001-12-20 08:57:10 |
| 31557 | Status     | Status | 2001-12-20 08:57:12 |
| 31569 | Correspond | NULL   | 2001-12-20 09:07:56 |
| 31570 | Set        | Status | 2001-12-20 09:07:57 |
| 31574 | Status     | Status | 2001-12-20 09:11:14 |
+-------+------------+--------+---------------------+
9 rows in set (0.01 sec)
+++++++++++++++++++

 From "Attachments" :
+++++++++++++++++++
mysql> select id,TransactionId,length(Content),ContentType from 
Attachments where TransactionId=31531;
+-------+---------------+-----------------+-----------------+
| id    | TransactionId | length(Content) | ContentType     |
+-------+---------------+-----------------+-----------------+
| 25069 |         31531 |            NULL | multipart/mixed |
| 25070 |         31531 |              23 | text/plain      |
| 25071 |         31531 |          491463 | image/jpeg      |
+-------+---------------+-----------------+-----------------+
3 rows in set (0.02 sec)
+++++++++++++++++++

Which means that the attachments are being stored properly. And from the 
logs, I found:
+++++++++++++++++++
Nov 12 08:58:05 dhcp3 RT: Premature padding of base64 data at 
/opt/rt3/lib/RT/Attachment_Overlay.pm line 266.  (/opt/rt3/lib/RT.pm:235)
+++++++++++++++++++

This message appeared shortly after trying to view(load) the ticket, and 
is repeated for all tickets which
appear to have truncated attachments. My money is on the decoding of 
tickets being at fault.

Ticket attachments are not truncated or broken, they are being displayed 
incorrectly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20031112/32037006/attachment.html>


More information about the rt-users mailing list