mget incompatible
Igor Sysoev
is at rambler-co.ru
Fri Oct 26 13:57:55 MSD 2007
On Fri, Oct 26, 2007 at 12:16:22PM +0300, MZ wrote:
> Есть такая штука, для многопоточной закачки файлов с http:
> /usr/ports/ftp/mget
>
> mGet is a command line download manager. It splits the file into a
> number of segments and uses several separate threads to download each
> segment. It can handle proxies and can tunnel through them to get files
> blocked by proxies. Currently mGet only handles HTTP downloads
> directly, while FTP downloads must go through a proxy.
> WWW: http://cs-people.bu.edu/dbera/activities/projects/mget/mget.php
>
> В общем, он с nginx не работает почему-то:
> Error code:-1
> HTTP Error: Unknown Error
> Exiting mGet/1.4.2
>
> Я не разбирался, но может кому-то интересно, кто ж отступает от http -
> mget или nginx ? С apache проблем нет.
Прилагаемый патч лечит это дело.
--
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
Index: src/http/ngx_http_parse.c
===================================================================
--- src/http/ngx_http_parse.c (revision 922)
+++ src/http/ngx_http_parse.c (working copy)
@@ -124,6 +124,7 @@
sw_major_digit,
sw_first_minor_digit,
sw_minor_digit,
+ sw_spaces_after_digit,
sw_almost_done
} state;
@@ -636,6 +637,11 @@
goto done;
}
+ if (ch == ' ') {
+ state = sw_spaces_after_digit;
+ break;
+ }
+
if (ch < '0' || ch > '9') {
return NGX_HTTP_PARSE_INVALID_REQUEST;
}
@@ -643,6 +649,20 @@
r->http_minor = r->http_minor * 10 + ch - '0';
break;
+ case sw_spaces_after_digit:
+ switch (ch) {
+ case ' ':
+ break;
+ case CR:
+ state = sw_almost_done;
+ break;
+ case LF:
+ goto done;
+ default:
+ return NGX_HTTP_PARSE_INVALID_REQUEST;
+ }
+ break;
+
/* end of request line */
case sw_almost_done:
r->request_end = p - 1;
More information about the nginx-ru
mailing list