Webdav mystery -- 301 error on a valid address

English support forum

Moderators: Hacker, petermad, Stefan2, white

Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Webdav mystery -- 301 error on a valid address

Post by *Loren Pechtel »

Accessed through Firefox as a web page--works fine but my objective is easy file uploading, ideally a script.

Accessed via windows--login never succeeds. (But from what I read the Windows client has problems.)

Accessed via TotalCommander with the WebDav plugin--"Error: 301 Moved Permanently", next line "Disconnected".

Is this something on my end or is it their problem?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please enable logging in Configuration - Options - FTP. This also logs plugins. Then enable detailed logs in the WebDAV connection. It should show you where you are being redirected.
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:Please enable logging in Configuration - Options - FTP. This also logs plugins. Then enable detailed logs in the WebDAV connection. It should show you where you are being redirected.
CONNECT \Neocities
=================
Get dir: /webdav
HTTP error: Error 12168, FormatMessage error 317
PROPFIND /webdav/ HTTP/1.1
Error: 301 Moved Permanently
Disconnected

however, entering the same URL into Firefox produces what's actually there:

/
Name Size Type Last Modified
Parent Directory
index.html 30.6K text/html Wed, 31 Dec 2014 16:56:58 GMT
not_found.html 600B text/html Mon, 12 Aug 2013 18:56:35 GMT
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

"Moved Permantently" means that the entered URL is wrong. Error 12168 occurs when there is a request which cannot be directed automatically. It could be a redirect from http to https. Try checking the option "Secure connection (via SSL)" in the connection settings.
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:"Moved Permantently" means that the entered URL is wrong. Error 12168 occurs when there is a request which cannot be directed automatically. It could be a redirect from http to https. Try checking the option "Secure connection (via SSL)" in the connection settings.
Makes sense, it's a HTTPS URL....that made a difference. Now I get a progress bar for some seconds (more time than would be needed to download the whole site) and then it gives:

Error 400: Bad Request
Disconnected

Trying it in Firefox still basically instantly brings up the list of files.
Mercade
Junior Member
Junior Member
Posts: 31
Joined: 2003-07-20, 17:51 UTC

Post by *Mercade »

Loren Pechtel wrote:
ghisler(Author) wrote:"Moved Permantently" means that the entered URL is wrong. Error 12168 occurs when there is a request which cannot be directed automatically. It could be a redirect from http to https. Try checking the option "Secure connection (via SSL)" in the connection settings.
Makes sense, it's a HTTPS URL....that made a difference. Now I get a progress bar for some seconds (more time than would be needed to download the whole site) and then it gives:

Error 400: Bad Request
Disconnected

Trying it in Firefox still basically instantly brings up the list of files.
I get exactly the same result (and yes, there's a redirect from http to https).
Connecting to: https://www.genesismud.org/webdav/
entered as www.genesismud.org/webdav/ with the SSL tick box on.
Here's the detailed log:
CONNECT \Quick connection
=================
Get dir: /webdav
PROPFIND /webdav/ HTTP/1.1
Depth: 1
Content-Type: text/xml; charset="utf-8"
User-Agent: ezdavplugin/2.6 TotalCommander/8.5 (Windows/7; en_EN)
Host: www.genesismud.org
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
******Received headers
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Connection: keep-alive
Status: 400 Bad Request
X-Powered-By: Phusion Passenger 4.0.57
Date: Mon, 05 Jan 2015 18:47:17 GMT
Server: nginx/1.6.2 + Phusion Passenger 4.0.57
Error: 400 Bad Request
PROPFIND /webdav/ HTTP/1.1
Depth: 1
Content-Type: text/xml; charset="utf-8"
User-Agent: ezdavplugin/2.6 TotalCommander/8.5 (Windows/7; en_EN)
Host: www.genesismud.org
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
******Received headers
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Connection: keep-alive
Status: 400 Bad Request
X-Powered-By: Phusion Passenger 4.0.57
Date: Mon, 05 Jan 2015 18:47:17 GMT
Server: nginx/1.6.2 + Phusion Passenger 4.0.57
Error: 400 Bad Request
Disconnected
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

Mercade wrote:
Loren Pechtel wrote:
ghisler(Author) wrote:"Moved Permantently" means that the entered URL is wrong. Error 12168 occurs when there is a request which cannot be directed automatically. It could be a redirect from http to https. Try checking the option "Secure connection (via SSL)" in the connection settings.
Makes sense, it's a HTTPS URL....that made a difference. Now I get a progress bar for some seconds (more time than would be needed to download the whole site) and then it gives:

Error 400: Bad Request
Disconnected

Trying it in Firefox still basically instantly brings up the list of files.
I get exactly the same result (and yes, there's a redirect from http to https).
Connecting to: https://www.genesismud.org/webdav/
entered as www.genesismud.org/webdav/ with the SSL tick box on.
Here's the detailed log:
CONNECT \Quick connection
=================
Get dir: /webdav
PROPFIND /webdav/ HTTP/1.1
Depth: 1
Content-Type: text/xml; charset="utf-8"
User-Agent: ezdavplugin/2.6 TotalCommander/8.5 (Windows/7; en_EN)
Host: www.genesismud.org
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
******Received headers
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Connection: keep-alive
Status: 400 Bad Request
X-Powered-By: Phusion Passenger 4.0.57
Date: Mon, 05 Jan 2015 18:47:17 GMT
Server: nginx/1.6.2 + Phusion Passenger 4.0.57
Error: 400 Bad Request
PROPFIND /webdav/ HTTP/1.1
Depth: 1
Content-Type: text/xml; charset="utf-8"
User-Agent: ezdavplugin/2.6 TotalCommander/8.5 (Windows/7; en_EN)
Host: www.genesismud.org
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
******Received headers
HTTP/1.1 400 Bad Request
Transfer-Encoding: chunked
Connection: keep-alive
Status: 400 Bad Request
X-Powered-By: Phusion Passenger 4.0.57
Date: Mon, 05 Jan 2015 18:47:17 GMT
Server: nginx/1.6.2 + Phusion Passenger 4.0.57
Error: 400 Bad Request
Disconnected
But now that I check the SSL there shouldn't be a redirect. I'm getting:
CONNECT \Neocities
=================
Get dir: /webdav
PROPFIND /webdav/ HTTP/1.1
Error: 400 Bad Request
PROPFIND /webdav/ HTTP/1.1
Error: 400 Bad Request
Disconnected
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

400 Bad Request seems to indicate that the WebDAV-specific command PROPFIND isn't supported by the server. If you go there with a Web browser, it doesn't use PROPFIND to get the list of files, it uses GET.

Maybe you need to allow PROPFIND via .htaccess. If you have something like
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>

you need to change it to

<Limit GET POST PROPFIND DELETE>
order deny,allow
deny from all
allow from all
</Limit>
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:400 Bad Request seems to indicate that the WebDAV-specific command PROPFIND isn't supported by the server. If you go there with a Web browser, it doesn't use PROPFIND to get the list of files, it uses GET.

Maybe you need to allow PROPFIND via .htaccess. If you have something like
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>

you need to change it to

<Limit GET POST PROPFIND DELETE>
order deny,allow
deny from all
allow from all
</Limit>
I don't have that sort of control.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you cannot enable WebDAV on your server, then you cannot access it with a WebDAV client, it's that simple.
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:If you cannot enable WebDAV on your server, then you cannot access it with a WebDAV client, it's that simple.
The web host says it's enabled. That's why I tried to set it up in Total Commander.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, apparently it's not, otherwise you wouldn't get an error when TC tries to call PROPFIND...

You can try to create a new network connection in Explorer - if that works, you can also use it in TC.
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:Well, apparently it's not, otherwise you wouldn't get an error when TC tries to call PROPFIND...

You can try to create a new network connection in Explorer - if that works, you can also use it in TC.
I was trying TC because Explorer didn't like it. Apparently the Webdav implementation on the other end has some problems.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Could you ask your provider what WebDAV client they recommend? And then try to access the server with that client? There probably IS a problem on the server...

One more thing: If the server is using CPanel, the WebDAV server will listen on port 2078. You will have to enter it like this
www.yourservername.com:2078/subdir
Author of Total Commander
https://www.ghisler.com
Loren Pechtel
Junior Member
Junior Member
Posts: 86
Joined: 2004-05-02, 01:50 UTC

Post by *Loren Pechtel »

ghisler(Author) wrote:Could you ask your provider what WebDAV client they recommend? And then try to access the server with that client? There probably IS a problem on the server...

One more thing: If the server is using CPanel, the WebDAV server will listen on port 2078. You will have to enter it like this
www.yourservername.com:2078/subdir
I'll drop them a line and see what's up.
Post Reply