Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unknown error occurred (Curl Response Code 301) #44

Open
fancywriter opened this issue Sep 21, 2024 · 4 comments
Open

An unknown error occurred (Curl Response Code 301) #44

fancywriter opened this issue Sep 21, 2024 · 4 comments

Comments

@fancywriter
Copy link

This is the only what I see on Apache server logs:

<Pocketbook IP> - - [21/Sep/2024:22:41:06 +0100] "PROPFIND /remote.php/dav/files/<username>/ HTTP/1.1" 301 579 "-" "-"

When I try to connect to my nextcloud on the same network with username and password. What exact CURL request is done? Does it have any logs? Or could I enable the logs to debug it?

If I do manually (from my laptop)

curl -k https://hostname/remote.php/dav/files/username/ -u "username:password"

I am getting 200 OK with

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.

However, If I add -X PROFFIND, I am getting an error, but a different one (and error 501, not 301):

The server was unable to complete your request.         If this happens again, please send the technical details below to the server administrator.             More details can be found in the server log.

(and no other details in apache or nextcloud logs about that)

@fancywriter
Copy link
Author

WebDAV works, I have tested it with davfs2, was able to mount directory (on laptop, not on pocketbook). Though it complained about "the server certificate does not match the server name", which is fine for me, I wish to ignore it now.

@fancywriter
Copy link
Author

It appeared it helped when I changed just "hostname" to "https://hostname" in the first field... Would be nice for this app to autocomplete the protocol because it's kind of obvious it's always https...

@JuanJakobo
Copy link
Owner

Unfortunately it is not obvious as there are still some users using their server without a cert. Once you type in the server URL there should be the text "https://domainname or WebDAV Url" shown. Do you think this remark is not enough?

@jficz
Copy link

jficz commented Dec 24, 2024

Same problem, different cause. Typed in just domain without https, my server does https redirect automatically. Maybe use curl in "follow" mode? 301 is a valid HTTP code which should be respected by the client and follow the redirect.

anyway, specifying https:// in front of domain worked so maybe just mention it in the docs or the dialog (or better yet, prefill https:// to the input field)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants