Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lftp corruption while fetching file #74

Closed
arekm opened this issue Jun 23, 2014 · 2 comments
Closed

lftp corruption while fetching file #74

arekm opened this issue Jun 23, 2014 · 2 comments

Comments

@arekm
Copy link

arekm commented Jun 23, 2014

File fetched using wget gets
43bd6676f0b404326eee2d63be3cdcfe rsync-3.1.1.tar.gz
while file fetched using lftp gets different md5sum:
966f1e6f0a7d1a612ce8587bda83da4e rsync-3.1.1.tar.gz

Didn't investigate which fault this is (server or client side).

[arekm@ixion-pld test]$ wget  http://rsync.samba.org/ftp/rsync/rsync-3.1.1.tar.gz ; md5sum rsync-3.1.1.tar.gz
--2014-06-23 11:50:40--  http://rsync.samba.org/ftp/rsync/rsync-3.1.1.tar.gz
Resolving rsync.samba.org (rsync.samba.org)... 2001:470:1f05:1a07::1, 216.83.154.106
Connecting to rsync.samba.org (rsync.samba.org)|2001:470:1f05:1a07::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 890124 (869K) [application/x-gzip]
Saving to: 'rsync-3.1.1.tar.gz'

100%[==================================================================================================================================>] 890,124      422KB/s   in 2.1s   

2014-06-23 11:50:42 (422 KB/s) - 'rsync-3.1.1.tar.gz' saved [890124/890124]

43bd6676f0b404326eee2d63be3cdcfe  rsync-3.1.1.tar.gz
[arekm@ixion-pld test]$ rm rsync-3.1.1.tar.gz; lftp -c "debug 3; get  http://rsync.samba.org/ftp/rsync/rsync-3.1.1.tar.gz "      
---- Connecting to rsync.samba.org (2001:470:1f05:1a07::1) port 80
[arekm@ixion-pld test]$ md5sum rsync-3.1.1.tar.gz                    
966f1e6f0a7d1a612ce8587bda83da4e  rsync-3.1.1.tar.gz
[arekm@ixion-pld test]$ lftp --version
LFTP | Version 4.5.2 | Copyright (c) 1996-2014 Alexander V. Lukyanov

LFTP is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LFTP.  If not, see <http://www.gnu.org/licenses/>.

Send bug reports and questions to the mailing list <lftp@uniyar.ac.ru>.

Libraries used: Readline 6.3, zlib 1.2.8
@lavv17
Copy link
Owner

lavv17 commented Jun 24, 2014

It's not corrupting, but decoding. Use set http:decode no to turn off decoding compressed http bodies with Content-Encoding: x-gzip.

I think lftp should be corrected though. When the body has a compressed Content-Type and also compressed Content-Encoding, then it is not necessary to decode the body. I'll fix it, although it is not quite a strict rule.

@lavv17
Copy link
Owner

lavv17 commented Jun 24, 2014

Should be fixed in 08b69aa

@lavv17 lavv17 closed this as completed Jun 24, 2014
arekm added a commit to pld-linux/lftp that referenced this issue Jun 24, 2014
@glensc glensc mentioned this issue Sep 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants