[bug] possible bug in the range filter

Maxim Dounin mdounin at mdounin.ru
Wed Dec 12 05:10:05 MSK 2007


Hello!

On Tue, 11 Dec 2007, Manlio Perillo wrote:

> I'm trying to add support for the nginx range filter in mod_wsgi but I have 
> found some problems.
>
> When I try to resume a file download (using wget) I get a:
> 2007/12/11 22:07:55 [crit] 26054#0: *2 writev() failed (14: Bad address), 
> client: 127.0.0.1, server: localhost
>
> It seems that there is a problem in mod_wsgi, but I have tested the range 
> filter using a standard (0.5.30, Debian Lenny) nginx server and I have found 
> that nginx returns a '\n' as first character.
>
> So, this seems to be a bug in Nginx.
>
>
> I have used a text file containing:
> abcdef
>
> and resumed a file containing
> a
>
> obtaining:
> a\nbcdef

Just checked this with 0.6.21 and 0.5.30 - everything is OK, wget & curl 
have no problems, and nginx response looks perfectly valid:

23:19:33.084718 IP 127.0.0.1.8080 > 127.0.0.1.63650: P 1:240(239) ack 128 
win 35840 <nop,nop,timestamp 6002274 6002274>
         0x0000:  4500 0123 f3c8 4000 4006 480a 7f00 0001  E..#.. at .@.H.....
         0x0010:  7f00 0001 1f90 f8a2 595f c3c1 22ae 27ad  ........Y_..".'.
         0x0020:  8018 8c00 274f 0000 0101 080a 005b 9662  ....'O.......[.b
         0x0030:  005b 9662 4854 5450 2f31 2e31 2032 3036  .[.bHTTP/1.1.206
         0x0040:  2050 6172 7469 616c 2043 6f6e 7465 6e74  .Partial.Content
         0x0050:  0d0a 5365 7276 6572 3a20 6e67 696e 782f  ..Server:.nginx/
         0x0060:  302e 352e 3330 0d0a 4461 7465 3a20 5475  0.5.30..Date:.Tu
         0x0070:  652c 2031 3120 4465 6320 3230 3037 2032  e,.11.Dec.2007.2
         0x0080:  303a 3139 3a33 3320 474d 540d 0a43 6f6e  0:19:33.GMT..Con
         0x0090:  7465 6e74 2d54 7970 653a 2074 6578 742f  tent-Type:.text/
         0x00a0:  706c 6169 6e0d 0a43 6f6e 7465 6e74 2d4c  plain..Content-L
         0x00b0:  656e 6774 683a 2035 0d0a 4c61 7374 2d4d  ength:.5..Last-M
         0x00c0:  6f64 6966 6965 643a 2054 7565 2c20 3131  odified:.Tue,.11
         0x00d0:  2044 6563 2032 3030 3720 3230 3a30 353a  .Dec.2007.20:05:
         0x00e0:  3238 2047 4d54 0d0a 436f 6e6e 6563 7469  28.GMT..Connecti
         0x00f0:  6f6e 3a20 6b65 6570 2d61 6c69 7665 0d0a  on:.keep-alive..
         0x0100:  436f 6e74 656e 742d 5261 6e67 653a 2062  Content-Range:.b
         0x0110:  7974 6573 2031 2d35 2f36 0d0a 0d0a 6263  ytes.1-5/6....bc
         0x0120:  6465 66                                  def

If you are sure you didn't do something really stupid like forgetting -n 
option to echo while constructing file to be resumed - could you please 
provide some more info?

Maxim Dounin





More information about the nginx mailing list