64 |
|
|
65 |
let http_send_range_request c range sock d = |
let http_send_range_request c range sock d = |
66 |
let url = d.download_url in |
let url = d.download_url in |
67 |
|
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 (y -- (Int64.one)) in |
71 |
|
|
81 |
name); *) |
name); *) |
82 |
Printf.bprintf buf "Host: %s\r\n" c.client_hostname; |
Printf.bprintf buf "Host: %s\r\n" c.client_hostname; |
83 |
Printf.bprintf buf "User-Agent: %s\r\n" user_agent; |
Printf.bprintf buf "User-Agent: %s\r\n" user_agent; |
84 |
|
Printf.bprintf buf "Referer: %s\r\n" (Url.to_string referer); |
85 |
Printf.bprintf buf "Range: bytes=%s\r\n" range; |
Printf.bprintf buf "Range: bytes=%s\r\n" range; |
86 |
Printf.bprintf buf "Connection: Keep-Alive\r\n"; |
Printf.bprintf buf "Connection: Keep-Alive\r\n"; |
87 |
Printf.bprintf buf "\r\n"; |
Printf.bprintf buf "\r\n"; |
180 |
if not (List.memq file !current_files) then begin |
if not (List.memq file !current_files) then begin |
181 |
current_files := file :: !current_files; |
current_files := file :: !current_files; |
182 |
end; |
end; |
183 |
add_download file c u; |
add_download file c u r; |
184 |
FileTPClients.get_file_from_source c file; |
FileTPClients.get_file_from_source c file; |
185 |
|
|
186 |
end; |
end; |