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

PROPFIND: Got 500 on stat() fail #55

Open
rozhuk-im opened this issue Mar 12, 2020 · 0 comments
Open

PROPFIND: Got 500 on stat() fail #55

rozhuk-im opened this issue Mar 12, 2020 · 0 comments

Comments

@rozhuk-im
Copy link

rozhuk-im commented Mar 12, 2020

I have some dir with simlink (ln -s) that points to non exist folder.
nginx return to me 500 - internal server error then I try to read this dir:

Request:

PROPFIND /DataStore/ HTTP/1.1
Host: 172.16.0.254
Range: bytes=0-
User-Agent: Kodi/19.0-ALPHA1 (X11; FreeBSD amd64) App_Bitness/64 Version/19.0-ALPHA1-Git:20200217-nogitfound
Accept: */*
Accept-Encoding: deflate, gzip
Accept-Charset: UTF-8,*;q=0.8
Content-Type: text/xml; charset="utf-8"
depth: 1

Response:

	HTTP/1.1 500 Internal Server Error
	Server: nginx
	Date: Thu, 12 Mar 2020 20:38:08 GMT
	Content-Type: text/html; charset=utf-8
	Content-Length: 170
	Connection: close
	
	<html>
	<head><title>500 Internal Server Error</title></head>
	<body>
	<center><h1>500 Internal Server Error</h1></center>
	<hr><center>nginx</center>
	</body>
	</html>

Error log:

2020/03/12 23:55:30 [crit] 43059#100926: *8 stat() "/usr/DataStore/Family" failed (2: No such file or directory), client: 172.16.0.226, server: , request: "PROPFIND /DataStore/ HTTP/1.1",
host: "172.16.0.254"
2020/03/12 23:55:30 [crit] 43059#100926: *8 stat() "/usr/DataStore/tmp" failed (2: No such file or directory), client: 172.16.0.226, server: , request: "PROPFIND /DataStore/ HTTP/1.1", hos
t: "172.16.0.254"

IMHO at this point it was broken: 732c02f#diff-4e53c5fe25cf9451fc3262464aa2813eR535

I do quick test:

@@ -896,10 +896,9 @@
             ngx_cpystrn(last, name.data, name.len + 1);
 
             if (ngx_de_info(filename, &dir) == NGX_FILE_ERROR) {
-                ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
+                ngx_log_error(NGX_LOG_ERR, r->connection->log, ngx_errno,
                               ngx_de_info_n " \"%s\" failed", filename);
-                rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
-                break;
+                continue;
             }
         }
 

this works for me.

rozhuk-im added a commit to rozhuk-im/nginx-dav-ext-module that referenced this issue Apr 15, 2020
mid1221213 added a commit to mid1221213/nginx-dav-ext-module that referenced this issue Nov 4, 2021
MkfsSion pushed a commit to MkfsSion/nginx-dav-ext-module that referenced this issue Feb 21, 2023
MkfsSion pushed a commit to MkfsSion/nginx-dav-ext-module that referenced this issue Feb 21, 2023
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

1 participant