Project

General

Profile

Bug #8624

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

Added by Șerban Bursuc 3 months ago. Updated 13 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Șerban Bursuc 3 months ago

Stream.java 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 3 months 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 about 2 months 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?

#5 Updated by Alexandru Lungu 13 days ago

8368b was merged to trunk. Any need to have this #8624 still opened, Serban? If not, lets Reject it.

#6 Updated by Șerban Bursuc 13 days ago

Alexandru Lungu wrote:

8368b was merged to trunk. Any need to have this #8624 still opened, Serban? If not, lets Reject it.

I don't think so. We opened this task in the context of file streams not considering the operating system. This was fixed. The task is a bit more general than this, so if there is still something left technically we should leave it up, but I don't think there is so we should close it.

#7 Updated by Greg Shah 13 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF