t.w.static.File lies in content-length when byterange falls off the end of the file

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from mwh <[email protected]>:

{{{/foo}}} is a 30 byte static resource.  That makes it hard to serve 990 bytes out of it, which is what twisted.web claims it's going to do:

{{{
mwh@grond:Twisted$ telnet localhost 8081
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /foo HTTP/1.1
Host: localhost
Range: bytes=10-1000
Connection: close
 
HTTP/1.1 206 Partial Content
Content-Length: 990
Accept-Ranges: bytes
Content-Range: bytes 10-999/31
Server: TwistedWeb/8.2.0+r26805
Last-Modified: Mon, 04 May 2009 08:40:47 GMT
Connection: close
Date: Mon, 04 May 2009 08:42:26 GMT
Content-Type: text/html

01234567890123456789
^]

telnet> close
}}}

I guess I'll fix this at the same time as I fix #3574.

----------
Type     : defect
Component: web
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3814
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.