📜 ⬆️ ⬇️

How would you solve this compatibility problem?

Since the article was written back in 2006, before the release of Windows Vista, Raymond, of course, had already given the answer. So, for the purity of the experiment, please do not spoil in the comments.

Hello everyone, you have a chance to solve one real compatibility problem. There is no answer yet: I am waiting for how you will solve it. This is a real bug in Widnows Vista tracker.


So, beta tester reported that Windows Explorer can not show more than a hundred files from network folders located on servers of a particular manufacturer. Responsible teams examined the problem, and found that the server incorrectly handles some types of requests. Despite the fact that the server stated that it supports both “fast” and “slow” requests, it returned only the first 100 files from the directory to the “fast” request, and then issued a strange error code. On the other hand, if Explorer switched to the “slow” mode, everything worked well. (“Quick” requests appeared only in Windows Vista, Windows XP only supported “slow”). Additional Information: An update to the server software that corrects this error has already been released, but the vendor continued to ship the old version of the driver.

What would you do in this situation? Here are some options, choose your own or offer a new one.
')

Nothing to do


Do not pay attention to the incorrect operation of a third-party driver. People who are not lucky to buy such a device will receive an incomplete list of files. Publish a KB explaining the problem and direct users to the vendor for an updated driver.

pros

Minuses


Automatically diagnose the error driver, and issue a warning dialog


Explorer should recognize this strange error code, and show a dialog that says “Server \\ servername seems to work with the old version of the XYZ driver, which does not work correctly with directories with a large number of files. Not all files are shown here. Contact the administrator \\ servername to upgrade the driver. " And tick "Do not show the message again."

pros

Minuses


Automatically diagnose the faulty driver, and next time use a different type of query.



Explorer should recognize this strange error code, and say, “Ok, this server has an invalid driver. It's too late to do anything, but next time, I will use a slow request to access the server. ”
To eliminate the possibility of a DOS attack, you only need to remember, say, the last 16 servers (if the list is unlimited, the attacker can overwhelm all the memory by creating a server that responds with a million different names with this error code).

Pros:

Minuses


Make the setting in the network client, which includes the "slow" mode.



Add a setting in the network client "If someone asks if the server supports fast requests, always say No, even if the server said Yes." In this case, none of the programs will try to use the “fast” mode, everyone will use only the slow one. But at least it will work.

pros

Minuses


Make a setting in Explorer that turns on “slow” mode



Make a setting in Explorer that says "Always use slow mode, never use quick queries." Requests will go slower, but will always work. But, this will only affect the work of Explorer; other programs that ask "Does the server support quick queries?" will receive an appropriate response, and if they try to use "quick" queries, they will get all the same problems that Explorer has already solved.

pros

Minuses



Disable default quick mode



Stop supporting fast mode in the network client, as it is unreliable; Some servers do not support it correctly. This will force all programs to use the slow mode. However, leave the option to turn it back on.

Pros:

Minuses:


Be creative. If you bring your decision, make a list of pros and cons.

Another obvious option, not described by Raymond in the article, but answered in the comments.

When reading for the first time, if the error returned, immediately re-read the list and return the full one, and then treat the server as if it were slow.

Not suitable because: the network client does not return the list when the request is completed, but in parts, asynchronously, at run time. So the first part of the list can be returned (and used by the client program) even before the network client receives an error and realizes that it is necessary to re-read the list.

And I immediately respond to comments like “Microsoft needs to open and fully document its protocols, they are to blame.” The bug , about which Raymond writes, has nothing to do with the correct execution of the protocol.

Source: https://habr.com/ru/post/108505/


All Articles