Changeset 821

Show
Ignore:
Timestamp:
06/12/09 09:10:07 (6 months ago)
Author:
ask
Message:

Make Content-Range replies work

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGES

    r819 r821  
     1    -- Make Content-Range replies work (Ask BjÞrn Hansen)  
     2 
    13    -- Make Redirect plugin more standards compliant (Ask BjÞrn Hansen) 
    24 
  • trunk/lib/Perlbal/BackendHTTP.pm

    r814 r821  
    521521        # also update the response code, in case of 206 partial content 
    522522        my $rescode = $hd->response_code; 
    523         $thd->code($rescode) if $rescode == 206 || $rescode == 416; 
     523        if ($rescode == 206 || $rescode == 416) { 
     524            $thd->code($rescode); 
     525            $thd->header('Accept-Ranges', $hd->header('Accept-Ranges')) if $hd->header('Accept-Ranges'); 
     526            $thd->header('Content-Range', $hd->header('Content-Range')) if $hd->header('Content-Range'); 
     527        }  
    524528        $thd->code(200) if $thd->response_code == 204;  # upgrade HTTP No Content (204) to 200 OK. 
    525529    }