[freeside-commits] freeside/httemplate/view attachment.html, 1.2, 1.2.6.1

Mark Wells mark at wavetail.420.am
Tue Aug 2 19:24:09 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv30646/httemplate/view

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	attachment.html 
Log Message:
avoid corrupt attachments, #13209 and #13877

Index: attachment.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/attachment.html,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -w -d -r1.2 -r1.2.6.1
--- attachment.html	10 Aug 2009 23:04:57 -0000	1.2
+++ attachment.html	3 Aug 2011 02:24:07 -0000	1.2.6.1
@@ -1,4 +1,3 @@
-<% $attach->body %>
 <%init>
 my ($query) = $cgi->keywords;
 $query =~ /^(\d+)$/;
@@ -8,9 +7,9 @@
 my $attach = qsearchs('cust_attachment', { attachnum => $attachnum }) or die "Attachment not found: $attachnum";
 die 'access denied' if $attach->disabled;
 
+$r->subprocess_env('no-gzip' => 1); # disable mod_deflate
 $m->clear_buffer;
 $r->content_type($attach->mime_type || 'text/plain');
 $r->headers_out->add('Content-Disposition' => 'attachment;filename=' . $attach->filename);
-
-
+$m->print($attach->body);
 </%init>



More information about the freeside-commits mailing list