Search squid archive

Re: Replace LF with CR/LF while transfer from ftp through squid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



06.08.2013 19:18, Eliezer Croitoru пишет:
On 08/06/2013 03:34 PM, Alexey Roslyakov wrote:
06.08.2013 17:21, Eliezer Croitoru пишет:
It's not squid 100%. I have downloaded a file using chrome and it
seems like geany shows it fine. If you have issues with that you
should try to use another OS and then inspect the file to make sure
the OS or the browser does soemthing to the file. Regards, Eliezer
Thank you for you reply.
Hmm, dunno what I'm doing wrong. I'm try it on:
Internet <-> FreeBSD + squid (2.7,3.1,3.2) <-> FreeBSD: fetch
ftp://url_to_file
Internet <-> FreeBSD + squid3.2 <-> Win7: IE/FireFox
Internet <-> Debian 7 + squid3 <-> Debian 7: wget ftp://url_to_file
Internet <-> Debian 7 + squid3 <-> Debian 7: Iceweasel
and none of this combination was helpful (only direct download).

ps: I'm trying d/l this two files: malloc-2.8.4.c (original size:
199774), malloc-2.8.4.h (originnal size: 20320)from link in previous
message.


This is how it's being done using wget:
------
tmp]$ wget "ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.h";
--2013-08-06 16:09:41--  ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.h
            => ‘malloc-2.8.4.h.1’
Resolving gee.cs.oswego.edu (gee.cs.oswego.edu)... 129.3.20.1
Connecting to gee.cs.oswego.edu (gee.cs.oswego.edu)|129.3.20.1|:21...
connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/misc ... done.
==> SIZE malloc-2.8.4.h ... 20320
==> PASV ... done.    ==> RETR malloc-2.8.4.h ... done.
Length: 20320 (20K) (unauthoritative)

100%[===============================================================================================================================================>]
20,320      45.8KB/s   in 0.4s

2013-08-06 16:09:50 (45.8 KB/s) - ‘malloc-2.8.4.h.1’ saved [20320]

this file is being maybe changed by one of the blinds in the way...

This is a basic diff that shows what you are saying:
  cat -A malloc-2.8.4.c|head
/*$
   This is a version (aka dlmalloc) of malloc/free/realloc written by$
   Doug Lea and released to the public domain, as explained at$
   http://creativecommons.org/licenses/publicdomain.  Send questions,$
   comments, complaints, performance data, etc to dl@xxxxxxxxxxxxx$
$
* Version 2.8.4 Wed May 27 09:56:23 2009  Doug Lea  (dl at gee)$
$
    Note: There may be an updated version of this malloc obtainable at$
            ftp://gee.cs.oswego.edu/pub/misc/malloc.c$
[eliezer@EC7 tmp]$ cat -A malloc-2.8.4.c.1|head
/*^M$
   This is a version (aka dlmalloc) of malloc/free/realloc written by^M$
   Doug Lea and released to the public domain, as explained at^M$
   http://creativecommons.org/licenses/publicdomain.  Send questions,^M$
   comments, complaints, performance data, etc to dl@xxxxxxxxxxxxx^M$
^M$
* Version 2.8.4 Wed May 27 09:56:23 2009  Doug Lea  (dl at gee)^M$
^M$
    Note: There may be an updated version of this malloc obtainable at^M$
            ftp://gee.cs.oswego.edu/pub/misc/malloc.c^M$
----
And it only states that there is a transformation either by wget or
other application since for me using squid+geany there is no difference..

Now trying ftp using a proxy like squid 3.4.0.1:
...
ftp> get malloc-2.8.4.c
local: malloc-2.8.4.c remote: malloc-2.8.4.c
227 Entering Passive Mode (129,3,20,1,122,12)
150 Opening BINARY mode data connection for malloc-2.8.4.c (199774 bytes).
226 Transfer complete.
199774 bytes received in 2 secs (99.93 Kbytes/sec)
ftp> quit
221-You have transferred 199774 bytes in 1 files.
221-Total traffic for this session was 204403 bytes in 4 transfers.
221-Thank you for using the FTP service on gee.
221 Goodbye.
#ls -la malloc-2.8.4.c
-rw-rw-r--. 1 eliezer eliezer 199774 Aug  6 16:16 malloc-2.8.4.c

so which is it? wget or ftp?

Eliezer
Ok. In your diff you can see wrong version with "^M$". But your wget listing seems like working without proxy.
My wget with proxy:
# squid3 -v
Squid Cache: Version 3.3.8
# wget ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.c
--2013-08-06 19:48:46-- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.c
Подключение к 192.168.0.148:3128... соединение установлено.
Proxy-запрос отправлен. Ожидание ответа... 200 Gatewaying
Длина: нет данных [text/plain]
Сохранение в: «malloc-2.8.4.c»

    [     <=>                               ] 205 471 136KB/s   за 1,5s

2013-08-06 19:48:51 (136 KB/s) - «malloc-2.8.4.c» сохранён [205471]

and without:
# wget ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.c
--2013-08-06 19:50:07-- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.4.c
           => «malloc-2.8.4.c.2»
Распознаётся gee.cs.oswego.edu (gee.cs.oswego.edu)... 129.3.20.1
Подключение к gee.cs.oswego.edu (gee.cs.oswego.edu)|129.3.20.1|:21... соединение установлено.
Выполняется вход под именем anonymous ... Выполнен вход в систему!
==> SYST ... готово.  ==> PWD ... готово.
==> TYPE I ... готово.   ==> CWD (1) /pub/misc ... готово.
==> SIZE malloc-2.8.4.c ... 199774
==> PASV ... готово.  ==> RETR malloc-2.8.4.c ... готово.
Размер (байт): 199774 (195K) (не достоверно)

100%[======================================>] 199 774 156KB/s   за 1,3s

2013-08-06 19:50:11 (156 KB/s) - «malloc-2.8.4.c.2» сохранён [199774]






[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux