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

David Collier-Brown davecb at sun.com
Wed Nov 28 18:29:18 GMT 2007


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 at sun.com                 |                      -- Mark Twain
(800) 555-9786 x56583 cell: (647) 833-9377 home off: (416) 223-5943 


More information about the samba-technical mailing list