Bug #8624

Stream should detect whether it is being used from the client or the server

Added by Șerban Bursuc about 1 month ago. Updated 4 days ago.

Target version:
Start date:
Due date:
% Done:




#1 Updated by Șerban Bursuc about 1 month ago is being used by both the server and the client, however some functions are OS dependent and this is not being accounted for.

writeNewLine should append CRLF if the target OS is Windows and LF if the platform is Linux, however there is no such distinction.

In #8368 a fix was attempted by using ThinClient.isUnderWindows() to check the platform however this is a client function which gets its value from the current session and it cannot be used.

I do not know any testcase where Stream is being used from the server, but this is according to #8368-33.

#3 Updated by Greg Shah about 1 month ago

Stream is "dual mode" and is used as a base class for RemoteStream which is used from converted code on the server as well as being used on the client side base class for FileStream etc...

In addition, we have "server-side" file system support (see #4065) where we use the local file system at the server instead of calling over to the client.

I agree that we need to handle this newline non-sense (and platform knowledge) in a better way. It will likely affect Stream and its subclasses.

#4 Updated by Șerban Bursuc 4 days ago

Greg, what do I need to do in order to do server side stream operations? I noticed some setup steps from #4065, besides what is mentioned there, is there anything else needed? AFAIK all the setup does is operate on a server-side file system instead of a client-side one, after which all stream operations such as PUT or EXPORT are done using the new file system. With this setup I can experiment to write a criteria to distinguish both file system environments and use the appropriate operations. Is this correct?

Also available in: Atom PDF