zsh-workers
 help / color / mirror / code / Atom feed
* zftp annoyance
@ 2001-05-24 14:08 Oliver Kiddle
  2001-05-24 14:31 ` Peter Stephenson
  2001-05-24 14:40 ` Bart Schaefer
  0 siblings, 2 replies; 7+ messages in thread
From: Oliver Kiddle @ 2001-05-24 14:08 UTC (permalink / raw)
  To: zsh-workers

I'm using zftp to transfer things back and forth from a server.
Unfortunately, every time the connection times out and zftp reconnects
the transfer type is reverting to ASCII. Surely it ought to be restoring
the transfer type when it reconnects?

This may just be something related to the particular ftp server - I
normally use ncftp because I would normally get one file and quit so I'm
not hugely familiar with zftp. Is it possible to make binary the default
transfer type for zftp?

Oliver


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 14:08 zftp annoyance Oliver Kiddle
@ 2001-05-24 14:31 ` Peter Stephenson
  2001-05-24 16:29   ` Oliver Kiddle
  2001-05-24 14:40 ` Bart Schaefer
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2001-05-24 14:31 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote:
> I'm using zftp to transfer things back and forth from a server.
> Unfortunately, every time the connection times out and zftp reconnects
> the transfer type is reverting to ASCII. Surely it ought to be restoring
> the transfer type when it reconnects?
> 
> This may just be something related to the particular ftp server - I
> normally use ncftp because I would normally get one file and quit so I'm
> not hugely familiar with zftp. Is it possible to make binary the default
> transfer type for zftp?

The zftp core code will switch to binary if the remote server claims to be
UNIX with 8-bit characters.  (Actually it won't do this until you are
logged in, because some servers won't let you, but this shouldn't be a
problem.)

Look and see if $ZFTP_SYSTEM contains "UNIX Type: L8"; if not, it won't
happen automatically.

It should be easy to adapt the function suite to remember this.  It would
be even easier to make binary the default:  just doctor zfopen and zfanon
and put `zftype binary' at the end.  Hooks aren't currently implemented,
but that could be done.

Making zfget support [user@]host:file and URL notation for one-off
retrievals is another useful, and relatively simple, possibility.  I
haven't been doing much with zftp recently.

My own bugbear is that interrupt handling is very bad.  I was hoping
someone else would get fed up with this and fix it.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 14:08 zftp annoyance Oliver Kiddle
  2001-05-24 14:31 ` Peter Stephenson
@ 2001-05-24 14:40 ` Bart Schaefer
  1 sibling, 0 replies; 7+ messages in thread
From: Bart Schaefer @ 2001-05-24 14:40 UTC (permalink / raw)
  To: Oliver Kiddle, zsh-workers

On May 24,  3:08pm, Oliver Kiddle wrote:
} Subject: zftp annoyance
}
} Unfortunately, every time the connection times out and zftp reconnects
} the transfer type is reverting to ASCII. Surely it ought to be restoring
} the transfer type when it reconnects?

How are you managing reconnect on timeout?  Using zfautocheck?

Looks like the zfconfig parameter maintained by the function system should
be storing the transfer type, which it isn't.

} This may just be something related to the particular ftp server

The doc (for raw zftp, not the function system) says:

     The FTP default for a transfer is ASCII.  However, if zftp finds
     that the remote host is a UNIX machine with 8-bit byes, it will
     automatically switch to using binary for file transfers upon open.


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 14:31 ` Peter Stephenson
@ 2001-05-24 16:29   ` Oliver Kiddle
  2001-05-24 16:39     ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Oliver Kiddle @ 2001-05-24 16:29 UTC (permalink / raw)
  To: zsh-workers

Peter Stephenson wrote:
> 
> 
> Look and see if $ZFTP_SYSTEM contains "UNIX Type: L8"; if not, it won't
> happen automatically.

$ZFTP_SYSTEM appears to be unset. Did you mean $ZFTP_SESSION which is
`default'.

> It should be easy to adapt the function suite to remember this.  It would
> be even easier to make binary the default:  just doctor zfopen and zfanon
> and put `zftype binary' at the end.  Hooks aren't currently implemented,
> but that could be done.

I'd probably do that but it'd be a hassle every time I upgrade zsh.
Would anyone object to having a style for this?

> Making zfget support [user@]host:file and URL notation for one-off
> retrievals is another useful, and relatively simple, possibility.  I
> haven't been doing much with zftp recently.

It isn't on the top of my list. I'm happy with wget etc for those sort
of things. zftp is really useful when you want to keep the session for a
while and mix it with other commands.

> How are you managing reconnect on timeout?  Using zfautocheck?

Yes, or whatever the default is after running zfinit. The only
configuration I've done of zftp is making sure zstyle -d is after zfinit
to clear the default styles.

> Looks like the zfconfig parameter maintained by the function system should
> be storing the transfer type, which it isn't.

Yes. That sounds like the sort of thing I was expecting to be the
problem.

Oliver


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 16:29   ` Oliver Kiddle
@ 2001-05-24 16:39     ` Peter Stephenson
  2001-05-24 17:02       ` Oliver Kiddle
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2001-05-24 16:39 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote:
> Peter Stephenson wrote:
> > 
> > 
> > Look and see if $ZFTP_SYSTEM contains "UNIX Type: L8"; if not, it won't
> > happen automatically.
> 
> $ZFTP_SYSTEM appears to be unset.

That suggests the system doesn't support SYST.  Try using ncftp and see
what you get with `quote SYST'.  If you get a response there could be a
problem somewhere in zftp.c.

> > It should be easy to adapt the function suite to remember this.  It would
> > be even easier to make binary the default:  just doctor zfopen and zfanon
> > and put `zftype binary' at the end.  Hooks aren't currently implemented,
> > but that could be done.
> 
> I'd probably do that but it'd be a hassle every time I upgrade zsh.
> Would anyone object to having a style for this?

That sounds quite sensible.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 16:39     ` Peter Stephenson
@ 2001-05-24 17:02       ` Oliver Kiddle
  2001-05-24 18:18         ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Oliver Kiddle @ 2001-05-24 17:02 UTC (permalink / raw)
  To: zsh-workers

Peter Stephenson wrote:
> 
> > $ZFTP_SYSTEM appears to be unset.

> That suggests the system doesn't support SYST.  Try using ncftp and see
> what you get with `quote SYST'.  If you get a response there could be a
> problem somewhere in zftp.c.

quote SYST from ncftp correctly gives UNIX Type: L8. At the end of
zfanon's about, I get:
500 Syntax error, command unrecognized.
which might have something to do with it. The server is ftp.plig.org if
that helps. If you can't repeat it, it may be something caused by the
firewall here which has been causing a few problems with ftp recently.

Oliver


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zftp annoyance
  2001-05-24 17:02       ` Oliver Kiddle
@ 2001-05-24 18:18         ` Peter Stephenson
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2001-05-24 18:18 UTC (permalink / raw)
  To: zsh-workers

Oliver Kiddle wrote:
> quote SYST from ncftp correctly gives UNIX Type: L8. At the end of
> zfanon's about, I get:
> 500 Syntax error, command unrecognized.
> which might have something to do with it. The server is ftp.plig.org if
> that helps. If you can't repeat it, it may be something caused by the
> firewall here which has been causing a few problems with ftp recently.

I just tried it and I get "UNIX Type: L8" as expected, so something's a
little screwy in the middle or in the compilation somewhere.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-05-24 18:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-24 14:08 zftp annoyance Oliver Kiddle
2001-05-24 14:31 ` Peter Stephenson
2001-05-24 16:29   ` Oliver Kiddle
2001-05-24 16:39     ` Peter Stephenson
2001-05-24 17:02       ` Oliver Kiddle
2001-05-24 18:18         ` Peter Stephenson
2001-05-24 14:40 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).