samba-technical@lists.samba.org
[Top] [All Lists]

Re: If the server returned less than we asked for we're at EOF

Subject: Re: If the server returned less than we asked for we're at EOF
From: David Collier-Brown
Date: Wed, 28 Nov 2007 13:29:18 -0500
Amin Azez wrote:
For my case (as a proxy) I'm trying to find out if returning a short
(non-zero) read because it's all I have right-now is dangerous because
the client would not be incorrect to act as if it were eof.

        Aha: yes, that is exactly right, a proxy needs to act just
        like the remote machine in this respect, and takes a risk
        if it has any differences in observable behavior. This
        is visible enough that it would probably cause at least
Unix clients to make the wrong decisions and think the file was truncated (:-()
        
        Mind you, if the protocol has a "remaining" field, an
you can find how actual Windows servers and clients use it uses it, you might be able to return short reads
        without the kind of risk you'd see on Unix...

--dave
--
David Collier-Brown            | Always do right. This will gratify
Sun Microsystems, Toronto      | some people and astonish the rest
davecb@xxxxxxx                 |                      -- Mark Twain
(800) 555-9786 x56583 cell: (647) 833-9377 home off: (416) 223-5943
<Prev in Thread] Current Thread [Next in Thread>