/[mldonkey]/mldonkey/src/networks/fileTP/fileTPHTTP.ml
ViewVC logotype

Diff of /mldonkey/src/networks/fileTP/fileTPHTTP.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by spiralvoice, Sun Aug 7 12:57:22 2005 UTC revision 1.15 by spiralvoice, Sun Oct 16 20:42:54 2005 UTC
# Line 67  let http_send_range_request c range sock Line 67  let http_send_range_request c range sock
67    let referer = d.download_referer in    let referer = d.download_referer in
68        
69    let (x,y) = range in    let (x,y) = range in
70    let range = Printf.sprintf "%Ld-%Ld" x (y -- (Int64.one)) in    let range = Printf.sprintf "%Ld-%Ld" x (Int64.pred y) in
71    
72    let buf = Buffer.create 100 in    let buf = Buffer.create 100 in
73    
# Line 208  let rec client_parse_header c gconn sock Line 208  let rec client_parse_header c gconn sock
208                String.sub range (dash_pos+1) (slash_pos - dash_pos - 1))                String.sub range (dash_pos+1) (slash_pos - dash_pos - 1))
209            in            in
210            if slash_pos = star_pos - 1 then            if slash_pos = star_pos - 1 then
211              x,y ++ Int64.one (* "bytes x-y/*" *)              x, Int64.succ y (* "bytes x-y/*" *)
212            else            else
213            let z = Int64.of_string (            let z = Int64.of_string (
214                String.sub range (slash_pos+1) (len - slash_pos -1) )                String.sub range (slash_pos+1) (len - slash_pos -1) )
215            in            in
216            if y = z then x -- Int64.one, size else            if y = z then Int64.pred x, size else
217              x,y ++ Int64.one              x, Int64.succ y
218          with          with
219          | e ->          | e ->
220              lprintf_nl () "Exception %s for range [%s]"              lprintf_nl () "Exception %s for range [%s]"

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26