Perl module: fix sendfile() to work with large files.

Igor Sysoev is at rambler-co.ru
Tue Apr 28 21:28:53 MSD 2009


On Tue, Apr 28, 2009 at 08:09:51PM +0400, Maxim Dounin wrote:

> # HG changeset patch
> # User Maxim Dounin <mdounin at mdounin.ru>
> # Date 1240934462 -14400
> # Node ID a2d0123c0f1cbdd30de9f1f85831e781b8f0329b
> # Parent  28335b73075091c0e231e7660b1c1fca1dc23ef8
> Perl: fix sendfile() to work with large files.
> 
> diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs
> --- a/src/http/modules/perl/nginx.xs
> +++ b/src/http/modules/perl/nginx.xs
> @@ -607,7 +607,7 @@ sendfile(r, filename, offset = -1, bytes
>  
>      ngx_http_request_t        *r;
>      char                      *filename;
> -    int                        offset;
> +    off_t                      offset;
>      size_t                     bytes;
>      ngx_str_t                  path;
>      ngx_buf_t                 *b;

Ты это проверял ? Когда я программировал это дело, я не мог понять, как
передать off_t вместо int. У меня есть ощущение, что это будет работать
только, если перл собран как xxxxxxx-64int.


-- 
Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list