Changeset 5272


Ignore:
Timestamp:
12/19/11 14:33:18 (11 years ago)
Author:
cristiano
Message:

Ticket #2387 - Inconsistência no tamanho de arquivos para download

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/get_archive.php

    r5134 r5272  
    204204if( $fileContent ) 
    205205{ 
    206     header("Content-transfer-encoding: ".$info["encoding"] ); 
    207  
    208     if( $image === "thumbnail" ) 
     206    header("Content-Length: ". mb_strlen($fileContent)); 
     207     
     208    if( isset($info["encoding"]) ) 
     209    { 
     210        header("Content-transfer-encoding: ".$info["encoding"] ); 
     211        header("Content-encoding: ".$info["encoding"] ); 
     212    }  
     213     
     214    if( $image === 'thumbnail'  && (strtolower(substr ( $info['name'] , (strrpos($info['name'], '.')+1))) !== 'bmp') ) 
    209215    { 
    210216        $pic = imagecreatefromstring( $fileContent ); 
     
    232238} 
    233239else 
    234 { 
     240{    
    235241    /** 
    236242    * Delete Diretorio 
     
    262268    $tempDir = $GLOBALS['phpgw_info']['server']['download_temp_dir']; 
    263269 
     270    header("Content-Length: ". filesize($filename)); 
     271    header("Content-encoding: text/plain" );  
     272     
    264273    if (preg_match("#^".$tempDir."/(".$GLOBALS['phpgw']->session->sessionid."/)*[A-z0-9_]+_".$GLOBALS['phpgw']->session->sessionid."[A-z0-9]*(\.[A-z]{3,4})?$#",$filename)) 
    265274    { 
     
    281290    } 
    282291} 
    283  
     292         
    284293//-----------------------// 
    285294 
Note: See TracChangeset for help on using the changeset viewer.