new
[libcurl.git] / curl_63_partialdl.patch
blob9df65e232bb489e07de21815f07975d429441eb0
1 *** /homes/qradlsg/curl-org/lib/download.c Thu Nov 11 08:57:12 1999
2 --- lib/download.c Mon Nov 22 08:33:13 1999
3 ***************
4 *** 455,461 ****
5 #endif
8 !
9 ProgressShow (data, bytecount, start, now, TRUE);
11 *bytecountp = bytecount;
12 --- 455,464 ----
13 #endif
16 ! if(contentlength && (bytecount != contentlength)) {
17 ! failf(data, "transfer closed with %d bytes remaining", contentlength-bytecount);
18 ! return URG_PARTIAL_FILE;
19 ! }
20 ProgressShow (data, bytecount, start, now, TRUE);
22 *bytecountp = bytecount;
23 *** /homes/qradlsg/curl-org/include/curl/curl.h Thu Nov 11 21:58:02 1999
24 --- include/curl/curl.h Mon Nov 22 08:33:59 1999
25 ***************
26 *** 159,165 ****
27 URG_FTP_CANT_GET_HOST,
28 URG_FTP_CANT_RECONNECT,
29 URG_FTP_COULDNT_SET_BINARY,
30 ! URG_FTP_PARTIAL_FILE,
31 URG_FTP_COULDNT_RETR_FILE,
32 URG_FTP_WRITE_ERROR,
33 URG_FTP_QUOTE_ERROR,
34 --- 159,165 ----
35 URG_FTP_CANT_GET_HOST,
36 URG_FTP_CANT_RECONNECT,
37 URG_FTP_COULDNT_SET_BINARY,
38 ! URG_PARTIAL_FILE,
39 URG_FTP_COULDNT_RETR_FILE,
40 URG_FTP_WRITE_ERROR,
41 URG_FTP_QUOTE_ERROR,
42 ***************
43 *** 197,202 ****
44 --- 197,205 ----
45 URL_LAST
46 } UrgError;
48 + /* This is just to make older programs not break: */
49 + #define URG_FTP_PARTIAL_FILE URG_PARTIAL_FILE
51 #define URGTAG_DONE -1
52 #define URGTAG_LAST -1
53 #define URGTAG_END -1
54 *** /homes/qradlsg/curl-org/lib/ftp.c Sat Oct 30 17:43:25 1999
55 --- lib/ftp.c Mon Nov 22 08:34:27 1999
56 ***************
57 *** 707,713 ****
58 if((-1 != data->infilesize) && (data->infilesize != *bytecountp)) {
59 failf(data, "Wrote only partial file (%d out of %d bytes)",
60 *bytecountp, data->infilesize);
61 ! return URG_FTP_PARTIAL_FILE;
64 else {
65 --- 707,713 ----
66 if((-1 != data->infilesize) && (data->infilesize != *bytecountp)) {
67 failf(data, "Wrote only partial file (%d out of %d bytes)",
68 *bytecountp, data->infilesize);
69 ! return URG_PARTIAL_FILE;
72 else {
73 ***************
74 *** 908,914 ****
75 if(size <= 0) {
76 failf(data, "Offset (%d) was beyond file size (%d)",
77 data->resume_from, data->resume_from+size);
78 ! return URG_FTP_PARTIAL_FILE;
81 #endif
82 --- 908,914 ----
83 if(size <= 0) {
84 failf(data, "Offset (%d) was beyond file size (%d)",
85 data->resume_from, data->resume_from+size);
86 ! return URG_PARTIAL_FILE;
89 #endif
90 ***************
91 *** 929,935 ****
93 if((-1 != size) && (size != *bytecountp)) {
94 failf(data, "Received only partial file");
95 ! return URG_FTP_PARTIAL_FILE;
97 else if(0 == *bytecountp) {
98 failf(data, "No data was received!");
99 --- 929,935 ----
101 if((-1 != size) && (size != *bytecountp)) {
102 failf(data, "Received only partial file");
103 ! return URG_PARTIAL_FILE;
105 else if(0 == *bytecountp) {
106 failf(data, "No data was received!");