http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2238 *** shadow/2238 Tue Jun 19 11:58:28 2001 --- shadow/2238.tmp.25106 Tue Jun 19 11:58:28 2001 *************** *** 0 **** --- 1,52 ---- + +============================================================================+ + | libWWW problems with broken proxys and range requests | + +----------------------------------------------------------------------------+ + | Bug #: 2238 Product: Xerces-C | + | Status: NEW Version: 1.5 | + | Resolution: Platform: Alpha | + | Severity: Normal OS/Version: Other | + | Priority: Other Component: Utilities | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Some broken proxy servers (e.g. the one behind which I happen to reside, + which apparently is Server: Microsoft-IIS/5.0) + implement wrong boundary conditions for range requests. In particular, + (1) request ranges straddling the content length of the document + give bogus header information + Content-Range: bytes X-Y/Z + where Y > Z, and give 0 bytes of actual message content. + (2) request ranges beyond the content length of the document do not + give an error response as asked for in RFC2616 (http/1.1) + + Since the NetAccessor code was just trying to fall off the end of the + document with the last range request (ie. hitting case 1 above), it + never gets the last chunk of data from this proxy server. + + Here is a patch: + # diff -c BinURLInputStream.cpp BinURLInputStream.cpp.orig + *** BinURLInputStream.cpp Tue Jun 19 14:30:48 2001 + --- BinURLInputStream.cpp.orig Tue Jun 19 14:29:11 2001 + *************** + *** 276,282 **** + // range of bytes that you would like. + + sprintf(ranges, "%ld-%ld", + ! fBytesProcessed, MIN(fBytesProcessed + URLISBUFMAXSIZE - 1, + fRemoteFileSize - 1)); + HTRequest_addRange(request, "bytes", ranges); + HTRequest_setOutputFormat(request, WWW_SOURCE); + result = HTLoadAnchorToChunk(fAnchor, request); + --- 271,277 ---- + // range of bytes that you would like. + + sprintf(ranges, "%ld-%ld", + ! fBytesProcessed, fBytesProcessed + URLISBUFMAXSIZE - 1); + HTRequest_addRange(request, "bytes", ranges); + HTRequest_setOutputFormat(request, WWW_SOURCE); + result = HTLoadAnchorToChunk(fAnchor, request); \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
