Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.6.2, 5.7.0
-
None
-
Windows 7, although I'm positive Linux and other Windows versions are effected.
Using Wireshark to examine the network requests.
Description
Hi,
It would be very useful to have a parameter to disable the HELP request that is being sent before it downloads each file. (Using the QNetworkAccessManager)
I know why it uses the HELP request:
1. It sends the HELP request to the FTP server and returns all available commands.
2. If the returned commands are SIZE it will send a SIZE request on the file to be downloaded.
3. If the returned commands are MDTM it will send a MDTM request on the file to be downloaded.
4. After it sends those 2 commands to the FTP server it will start to download the file.
I believe this effects all versions of Qt 5.x
This does NOT effect Qt 4.x (Yes I know I can still use QFTP, unfortunately that's not an option for me.)
I'm not saying that sending the HELP request is not important but when you know your own configuration of the FTP server it can be useful to send the least amount of commands to your server. (If you know you're going to get high load)
I've looked through the source code below and I believe if I make the following adjustments (lines that are commented out) I can stop sending the HELP request without effecting anything else. I've uploaded a screenshot of the adjustments.
qtbase/src/network/access/qnetworkaccessftpbackend.cpp
I have also included a screenshot of the wireshark trace showing the HELP request being sent. (SIZE and MDTM are included in the response, you can't see it because wireshark hides it, not sure why, but it is there)
I'm currently building Qt with the source code changes I've made, I will report back in 6 hours when It has finished to see if I have disabled the HELP request.
Thank you for your time,
EDIT: I've managed to change the source code to stop sending the HELP request. Please look at the image, "changes_1.png" for the code I have changed.
Attachments
Issue Links
- relates to
-
QTBUG-69477 QNAM fails to download anything from FTP servers that don't support HELP command
- Closed