cvsuser     05/10/27 13:38:53

  Modified:    App-Widget/lib/App/SessionObject Content.pm
  Log:
  fixed
  
  Revision  Changes    Path
  1.2       +8 -7      p5ee/App-Widget/lib/App/SessionObject/Content.pm
  
  Index: Content.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Widget/lib/App/SessionObject/Content.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Content.pm        27 Oct 2005 20:25:07 -0000      1.1
  +++ Content.pm        27 Oct 2005 20:38:53 -0000      1.2
  @@ -92,17 +92,18 @@
   my %content_type = (
       html => "text/html",
       txt  => "text/plain",
  -    pdf  => "application/pdf",
  -    xls  => "application/vnd.ms-excel",
  +    pdf  => "application/pdf\nContent-disposition: attachment; 
filename=\"data.pdf\"",
  +    xls  => "application/vnd.ms-excel\nContent-disposition: attachment; 
filename=\"data.xls\"",
       xml  => "application/xml",
       csv  => "application/octet-stream\nContent-disposition: attachment; 
filename=\"data.csv\"",
  -    bin  => "application/octet-stream",
  +    bin  => "application/octet-stream\nContent-disposition: attachment; 
filename=\"data.bin\"",
   );
   
   sub content_type {
       &App::sub_entry if ($App::trace);
  -    my $type = $self->{type} || "html";
  -    my $content_type = $content_type{$type};
  +    my ($self) = @_;
  +    my $extension = $self->{extension} || "html";
  +    my $content_type = $content_type{$extension};
       if (!$content_type) {
           $content_type = $content_type{bin};
       }
  
  
  

Reply via email to