[rt-devel] [rt-announce] RT 1.3.30 released
Jesse
jesse at fsck.com
Wed Jan 10 01:32:09 EST 2001
thanks. There's actually an easier fix. mason can be told not to parse
the value of a <% %> using a |n flag
so <%$AttachmentObj->Content%> should
become <%$AttachmentObj->Content |n %>
The abort is somewhat more important ;)
I'd not actually gotten to the point of testing binary attachments yet. good to
know that works (with the patch). Thanks! It'll be in 1.3.33 (.32 was a test release that went out tonight for a few testers)
jesse
On Wed, Jan 10, 2001 at 04:22:43PM +1000, Byron Ellacott wrote:
> On Wed, 3 Jan 2001, Jesse wrote:
>
> [snip]
>
> I noticed 1-3-31 sitting around, so I installed that. I'm giving a
> demonstration tomorrow, so I've been running through the web UI. I
> noticed a problem with attachments - HTML::Mason was munging everything to
> be HTML-nice, but a jpg doesn't display if its < characters are changed to
> <, and it's not good to have </BODY></HTML> on the end of binary
> attachments.
>
> Attached is a quick patch to the attachments dhandler to get HTML::Mason
> out of the way and provide the raw data, which can be applied with
>
> rt-1-3-31$ patch -p1 < rt-1-3-31-attachments.diff
>
> (Apply it when at the root of the rt2 tree).
>
> Since it only modifies webrt/Ticket/Attachment/dhandler, you can just
> apply it by hand, too.
>
> --
> bje
> diff -Naur rt-1-3-31/webrt/Ticket/Attachment/dhandler rt-1-3-31-attch/webrt/Ticket/Attachment/dhandler
> --- rt-1-3-31/webrt/Ticket/Attachment/dhandler Fri Dec 15 14:04:00 2000
> +++ rt-1-3-31-attch/webrt/Ticket/Attachment/dhandler Wed Jan 10 16:19:29 2001
> @@ -1,5 +1,4 @@
> -<%$AttachmentObj->Content%>
> -<%init>
> +<%perl>
> my ($ticket, $trans,$attach, $filename);
> my $arg = $m->dhandler_arg; # get rest of path
> if ($arg =~ '^(\d+)/(\d+)/(\d+)/(.*)$') {
> @@ -22,5 +21,7 @@
> }
> my $content_type = $AttachmentObj->ContentType || 'text/html';
> $r->content_type($content_type);
> -</%init>
> + $m->out($AttachmentObj->Content);
> + $m->abort;
> +</%perl>
>
--
jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
autoconf is your friend until it mysteriously stops working, at which
point it is a snarling wolverine attached to your genitals by its teeth
(that said, it's better than most of the alternatives) -- Nathan Mehl
More information about the Rt-devel
mailing list