WinSCP WebDAV Transfer Issue – Getting "400 Bad Request” Errors

Advertisement

pab49162
Donor
Joined:
Posts:
2
Location:
USA

WinSCP WebDAV Transfer Issue – Getting "400 Bad Request” Errors

I am having an isue with WinSCP periodically giving me "400 Bad Request" errors when doing a file uploads using WebDAV protocal in background transfer mode using multiple connections for a single transfer.

I am using the WinSCP version 5.15.1 (Build 9407) and would appreciate any comments or suggestions. Below are more details ...

I only see these errors using WinSCP in a specific configuration - the transfers are done in background using WebDAV with the “Use multiple connections for single transfer” option. If I deselect the multiple connections option, I do not see any of the “400 Bad Request” errors. Also, if I use FTPS protocol instead of WebDAV, I do not see any problem when using the multiple connections option.

I have reproduced these errors on three different hosting providers but have two others where I can’t generate the errors. I can't find anything to explain why it works on some and not the others.

My test case for all of the hosting providers is the transfer of about 85MB of files (196 files total) and I typically see between 5 to 10 errors per test. For each error, an error window will popup and if I select “Retry”, the transfer will work on the retry.

The following is an excerpt of an error log generated for a single error condition. The 404 error is shown at time 09:12:32.496.

. 2019-05-16 09:12:32.394 [Background 3] File: 'F:\Temp\Temp1\favicon\favicon-32x32.png' [2019-05-13T21:55:40.000Z] [2116]
. 2019-05-16 09:12:32.394 [Background 3] Copying "F:\Temp\Temp1\favicon\favicon-32x32.png" to remote directory started.
. 2019-05-16 09:12:32.394 [Background 3] ah_create, for WWW-Authenticate
. 2019-05-16 09:12:32.394 [Background 3] auth: Sending 'Basic' response.
> 2019-05-16 09:12:32.394 [Background 3] <?xml version="1.0" encoding="utf-8"?>
> 2019-05-16 09:12:32.394 [Background 3] <propfind xmlns="DAV:"><allprop/></propfind>
. 2019-05-16 09:12:32.394 [Background 3] Sending request headers:
. 2019-05-16 09:12:32.394 [Background 3] PROPFIND /public_html/temp-upload-test1/favicon/favicon-32x32.png HTTP/1.1
. 2019-05-16 09:12:32.394 [Background 3] User-Agent: WinSCP/5.15.1 neon/0.30.2
. 2019-05-16 09:12:32.394 [Background 3] Connection: TE
. 2019-05-16 09:12:32.394 [Background 3] TE: trailers
. 2019-05-16 09:12:32.394 [Background 3] Host: _______________.com:2078
. 2019-05-16 09:12:32.394 [Background 3] Depth: 0
. 2019-05-16 09:12:32.394 [Background 3] Content-Length: 84
. 2019-05-16 09:12:32.394 [Background 3] Content-Type: application/xml
. 2019-05-16 09:12:32.394 [Background 3] Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
. 2019-05-16 09:12:32.394 [Background 3] Sending request-line and headers:
. 2019-05-16 09:12:32.394 [Background 3] Sending request body:
. 2019-05-16 09:12:32.394 [Background 3] Request sent; retry is 1.
. 2019-05-16 09:12:32.434 [Background 3] [status-line] < HTTP/1.1 404 Not Found
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [date], Value: [Thu, 16 May 2019 14:12:32 GMT]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [server], Value: [cPanel]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [persistent-auth], Value: [false]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [host], Value: [_______________.com:2078]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [cache-control], Value: [no-cache, no-store, must-revalidate, private]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [connection], Value: [Keep-Alive]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [vary], Value: [Accept-Encoding]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [content-length], Value: [0]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [expires], Value: [Fri, 01 Jan 1990 00:00:00 GMT]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [dav], Value: [1, 2]
. 2019-05-16 09:12:32.434 [Background 3] Header Name: [ms-author-via], Value: [DAV]
. 2019-05-16 09:12:32.434 [Background 3] End of headers.
. 2019-05-16 09:12:32.434 [Background 3] ah_post_send (#0), code is 404 (want 401), WWW-Authenticate is (none)
. 2019-05-16 09:12:32.434 [Background 3] Request ends, status 404 class 4xx, error line:
. 2019-05-16 09:12:32.434 [Background 3] 404 Not Found
. 2019-05-16 09:12:32.434 [Background 3] Request ends.
. 2019-05-16 09:12:32.435 [Background 3] ah_create, for WWW-Authenticate
. 2019-05-16 09:12:32.435 [Background 3] auth: Sending 'Basic' response.
. 2019-05-16 09:12:32.435 [Background 3] Sending request headers:
. 2019-05-16 09:12:32.435 [Background 3] PUT /public_html/temp-upload-test1/favicon/favicon-32x32.png HTTP/1.1
. 2019-05-16 09:12:32.435 [Background 3] User-Agent: WinSCP/5.15.1 neon/0.30.2
. 2019-05-16 09:12:32.435 [Background 3] Connection: TE
. 2019-05-16 09:12:32.435 [Background 3] TE: trailers
. 2019-05-16 09:12:32.435 [Background 3] Host: _______________.com:2078
. 2019-05-16 09:12:32.435 [Background 3] Content-Length: 2116
. 2019-05-16 09:12:32.435 [Background 3] Authorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
. 2019-05-16 09:12:32.435 [Background 3] Content-Type: image/png
. 2019-05-16 09:12:32.435 [Background 3] Sending request-line and headers:
. 2019-05-16 09:12:32.435 [Background 3] Sending request body:
. 2019-05-16 09:12:32.435 [Background 3] Request sent; retry is 1.
. 2019-05-16 09:12:32.496 [Background 3] [status-line] < HTTP/1.1 400 Bad Request
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [date], Value: [Thu, 16 May 2019 14:12:32 GMT]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [server], Value: [cPanel]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [persistent-auth], Value: [false]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [host], Value: [_______________.com:2078]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [cache-control], Value: [no-cache, no-store, must-revalidate, private]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [connection], Value: [close]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [vary], Value: [Accept-Encoding]
. 2019-05-16 09:12:32.496 [Background 3] Header Name: [expires], Value: [Fri, 01 Jan 1990 00:00:00 GMT]
. 2019-05-16 09:12:32.496 [Background 3] End of headers.
. 2019-05-16 09:12:32.496 [Background 3] ah_post_send (#0), code is 400 (want 401), WWW-Authenticate is (none)
. 2019-05-16 09:12:32.496 [Background 3] sess: Closing connection.
. 2019-05-16 09:12:32.496 [Background 3] sess: Connection closed.
. 2019-05-16 09:12:32.496 [Background 3] Request ends, status 400 class 4xx, error line:
. 2019-05-16 09:12:32.496 [Background 3] 400 Bad Request
. 2019-05-16 09:12:32.496 [Background 3] Request ends.
* 2019-05-16 09:12:32.496 [Background 3] (ExtException) 400 Bad Request
. 2019-05-16 09:12:32.496 [Background 3] Asking user:
. 2019-05-16 09:12:32.496 [Background 3] Error transferring file 'F:\Temp\Temp1\favicon\favicon-32x32.png'. ("400 Bad Request")

Any suggestions or comments regarding this issue would be greatly appreciated.

Thanks, Paul

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,532
Location:
Prague, Czechia

Re: WinSCP WebDAV Transfer Issue – Getting "400 Bad Request” Errors

It's difficult to tell why the server is returning an error randomly, as the error message is too generic.

Did you try to contact the provider? They may find more specific errors in their logs.

Reply with quote

pab49162
Donor
Joined:
Posts:
2
Location:
USA

Thank you for the reply to my post.

I have not yet contacted the hosting provider because I was able to duplicate this issue with three different hosts. Since I was able to reproduce it with multiple hosts, I thought I would to post here first hoping that others had encountered this previously and might give some hints or suggestions. This way, when I contacted my providers, I might be able to point them in the right direction.

Prior to switching to WinSCP, I used BitKinex with the WebDAV protocol for file transfers and had it configured similarly to use multiple connections for a single transfer. I used BitKinex for several years and dont't recall ever seeing any servers reply back with a 400 error.

I also tried CyberDuck the other day and saw similar 400 errors using the WebDAV protocol during some file uploads to one of the hosting providers. So I am pretty confident the issue is on the server side and not WinSCP.

Over the next couple of days, I will open a ticket with one of my hosting providers to request them to look at the WebDAV logs on their side and see if it has any useful information.

Reply with quote

Advertisement

You can post new topics in this forum