Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Error reading response headers: Line too long

@shail.shah: Thanks for your feedback.
I've just released WinSCP 6.3.4 with the workaround.
shail.shah

Re: Error reading response headers: Line too long

Hi Martin,

I have tested the executable you provided, and it is working fine. However, we're using the NuGet package with the service, which requires both the WinSCP DLL and executable.
When I tried replacing just the executable and ran the service, it threw the following error message:
Mdrx.Formulary.SynchronizationManager.exe	Information	0	

Session start at 06/11/2024 09:04:45
Connecting to SS WebDav............
Mdrx.Formulary.SynchronizationManager.exe Error 0
Error:
Message: The version of C:\Program Files (x86)\Mdrx.Hub.Formulary.V3.MultumDownload_WinSCP\winscp.exe (6.4.0.0) does not match version of this assembly C:\Program Files (x86)\Mdrx.Hub.Formulary.V3.MultumDownload_WinSCP\WinSCPnet.DLL (5.17.6.0).

StackTrace: at WinSCP.ExeSessionProcess.CheckVersion(String exePath, FileVersionInfo assemblyVersion)
at WinSCP.ExeSessionProcess..ctor(Session session, Boolean useXmlLog, String additionalArguments)
at WinSCP.Session.Open(SessionOptions sessionOptions)
at Mdrx.Formulary.SynchronizationManager.Synchronizer.Start()

Could you please provide me with the DLL for the pre-release build (version 6.4.0.0) along with the executable?

I appreciate your help!
Thanks,
Shail Shah
martin

Re: Error reading response headers: Line too long

@shail.shah and @rmiddaugh55386: Sent.
rkarnati

Re: Error reading response headers: Line too long

Appreciate if someone can provide the direction.
rmiddaugh55386

Re: Error reading response headers: Line too long

@martin: Please send me the pre-release build.
Guest

Re: Error reading response headers: Line too long

Is there any form or link to register to get the pre-build?
shail.shah

Re: Error reading response headers: Line too long

Hi @Martin,
I have already registered. Can you please provide me with the pre-released build?
Thanks,
Shail Shah
martin

Re: Error reading response headers: Line too long

We will consider merging the fix into 6.3.4 and release it within few weeks.

If you need pre-release build, I need you to register here, so I have a means of contacting you.
shail.shah

Error reading response headers: Line too long

Hi,

We're facing a similar error while downloading the file from Surescripts using WinSCP,
Message: Error listing directory '/webdav/Formulary/FBS_3_0'. Error reading response headers: Line too long

It looks like the same error, which is mentioned in this thread. We see there is a workaround already provided. We would need similar support to us ASAP as many of our clients are blocked.

Looking forward for your quick response.

Thanks,
Shail Shah
Guest

Error reading response headers: Line too long

Can you tell me when a new version will be released?
Can you send me the version that fixes this issue?
Riddhish

Hello Martin,

Thanks for clarifying the same.
Can you please provide timeline of next release which contains work-around changes to support server-side problem?

Thanks.
martin

@Guest: Not yet. It's not a "fix" of WinSCP problem. It's just a workaround for server-side problem.
Guest

Is the new version released which contains the fix?
johnmsch

Got it, looks good!
Thanks again
martin

@johnmsch: No, I've never heard from them.

I'm sending nightly build with the "fix" to both of you.
johnmsch

Thanks again @martin
I still can't get a straight answer from Surescripts, other than
Evidently there was a deployment several weeks ago that also affected other clients.

I also got another reply from level 3 support:
WinSCP has a new build which should resolve this issue. WinSCP customers are recommended to use this new build: https://winscp.net/tracker/2289

Did they ever reach out to you directly?
johnmsch

@martin - Here you go. Hopefully this is enough.
Your help has been greatly appreciated! If I can be of any further help, just let me know!
martin

Leading 10mb should be more than enough. Thanks.
johnmsch

@martin - Happy to attach, but the log file is 3.6gb, zipped up is 1.9gb. Looks like around 165,000 files were processed in the latest run. It appears that the file attachment limit here is 10mb. If you want the whole file, let me know how to get it to you, otherwise, how much of that do you want?
martin

@johnmsch: Can you please post a log file anyway?
johnmsch

@martin Normal download/sync in progress. THANK YOU!!!!!!!!!!!
martin

Re: Error reading response headers: Line too long

I've sent another build.

I'm not in contact with Surescripts team.
johnmsch

@martin - The line above that says:
Evidently there was a deployment several weeks ago that affected other clients.
should have said:
Evidently there was a deployment several weeks ago that also affected other clients.
johnmsch

@martin - New private log file attached.
The latest error is: Error reading response headers: Line too long (262145 > 262144)
Also got an update from Surescripts engineering team and they said they were working with you on a fix. Evidently there was a deployment several weeks ago that affected other clients.
Thanks for your efforts to resolve this for us!

P.S. @GregA - Would you please email me? Something I'd like to discuss with you, but your email is blocked. Mine should be available on this board.
jmb

Re: Error reading response headers: Line too long

Hi @martin. Is there a way to block or turn off accepting all cookies coming into WinSCP? Just wondering if this might solve this issue with the 12K cookie going over the current max size of 8K.
martin

OK, I've sent you both new build again.

@GregA: The RFC says:
General-use user agents SHOULD provide each of the following minimum capabilities: ...

  • At least 4096 bytes per cookie

...
Servers SHOULD use as few and as small cookies as possible to avoid reaching these implementation limits

So imo even 12K is way over the "implementation limits".
WinSCP should support about 8K by default.
Note that common webbrowsers like Chrome or Firewall do not allow more than those 4K.
johnmsch

@martin Attached is a new private log file. I rebooted the server, which hasn't been done for months. There is a new error on line 207: Script: Invalid access to memory.
Would you please look at this again?
We are having to manually download the data and have 3 people working on this daily.
Thank you
johnmsch

Thanks for that update @GregA.
I opened a case with Surescripts and they haven't made any changes to the formulary download process. They also say that out of the thousands of people downloading their formulary, you and me are the only ones having an issue. They have no way of knowing if any of the other clients are using WinSCP.
@martin – could you please take another look at this?
GregA

Error reading response headers: Line too long

When trying these same links using other clients, the session cookie is coming back around 12KB so values that are greater than 256kb seem like they must be in error.

Also, I read the rfc6265 differently. I read "At least 4096 bytes per cookie" as a minimum rather than a max. That said, hopefully I can find out why that value is the size that it is.
johnmsch

Thanks for the reply @martin.
The site we access at Surescripts is simply a data store that we synchronize some data files from. There are 10's of thousands of files and many of them update/add/delete on a daily basis and WinSCP has always been the perfect solution to synchronize all that data.
I just opened a support case with them and hope to have an answer within a few days.
I apologize for not contacting them first!
martin

You both seem to be connecting to the same host: files.surescripts.net
What is it?

Anyway, it seems that the server is trying to set a cookie that does not fit even to 256K buffer (I do not know what its actual size is).
Per RFC 6265, a cookie should not be over 4K:
https://datatracker.ietf.org/doc/html/rfc6265#section-6.1
johnmsch

Still not working. Different error this time. Private log file attahced.
martin

Thanks. I've sent a new build.
johnmsch

Sorry @martin, I did miss copying the .exe to C:\Program Files (x86)\WinSCP.
Attached is the current log file with both the .com and .exe in place
martin

Re: header line too long testing

@GregA: Sent. Thanks.
martin

@johnmsch: That log is from the official WinSCP 6.3.3, not from the development version. It seems that you have extracted only the console-wrapper winscp.com, but not the main winscp.exe.
johnmsch

Private attachment from testing with Development version.
Thank you
GregA

header line too long testing

I have also been seeing this issue. Would it be possible to get a copy of this dev version to test with?
martin

@johnmsch: I'm sorry, I somehow forgot to answer you.
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.
johnmsch

I will check with the vendor, but I don't think its on their side.
As mentioned above, I can log in to the WebDAV site manually using the same credentials and access the entire folder tree. That's what I've been doing for the past week.
Rv

Hello Team,

Can you advise how to solve this issue? Do you think that there is some issue on the Vendor site from where we are downloading the formulary file(s)?

Thanks
johnmsch

@martin – Please help me with this issue
I've been having to manually transfer hundreds of files every day since this stopped working.
Guest

Also upgraded to 6.3.3 before running, but still get the same error.
Guest

Attached is the log file.
I changed the user id to USERIDHIDDEN and the host name to HOSTNAMEHIDDEN.
Thank you!
martin

Re: Error reading response headers: Line too long

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
johnmsch

Error reading response headers: Line too long

Just started getting the above error a few days ago. This is an automated process that runs daily and has been running fine for a few years.
I manually logged in to the WebDAV site and was able to authenticate with no issues. Here is the log file:
open https://xxxxxxxxxxxxxxxx:***@files.xxxxxxxxxxx.net/webdav -timeout=120

Connecting to host...
Authenticated.
Starting the session...
Session started.
Active session: [1] xxxxxxxxxxxxxxx@files.xxxxxxxxxxx.net
synchronize local X:\FormularyDirectory\etc\DavClient\downloads\xxxxxxxxxxxxxxx\webdav\Formulary\FBS_3_0 /webdav/Formulary/FBS_3_0 -delete -criteria=either
Using configured synchronization options different from factory defaults.
Comparing...
Local 'X:\FormularyDirectory\etc\DavClient\downloads\xxxxxxxxxxxxxxx\webdav\Formulary\FBS_3_0' <= Remote '/webdav/Formulary/FBS_3_0'
Error listing directory '/webdav/Formulary/FBS_3_0'.
Error reading response headers: Line too long
(A)bort, (R)etry, (S)kip: Skip
Synchronizing...
Local 'X:\FormularyDirectory\etc\DavClient\downloads\xxxxxxxxxxxxxxx\webdav\Formulary\FBS_3_0' <= Remote '/webdav/Formulary/FBS_3_0'

It then proceeded to delete EVERY folder in the tree! Fortunately, I have a backup of those 200,000+ files and folders.

I'm running version 6.1.2

What's going on here?