diff options
| author | QXSoftware <lh563566994@126.com> | 2018-10-13 17:09:06 +0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-10-15 07:35:50 -0700 |
| commit | b2542f7778780de00d8573dd260c0358a1c25adf (patch) | |
| tree | d2a38f0c000b8423fcd2ca15176f48861636fb90 | |
| parent | eb49667c5a15ba7d173f9f0e68f6308e0a1db5b3 (diff) | |
| download | nng-b2542f7778780de00d8573dd260c0358a1c25adf.tar.gz nng-b2542f7778780de00d8573dd260c0358a1c25adf.tar.bz2 nng-b2542f7778780de00d8573dd260c0358a1c25adf.zip | |
eliminate double check for index.html if index.html exists
| -rw-r--r-- | src/supplemental/http/http_server.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c index 44c338f4..cdbfe3e6 100644 --- a/src/supplemental/http/http_server.c +++ b/src/supplemental/http/http_server.c @@ -1,6 +1,7 @@ // // Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> +// Copyright 2018 QXSoftware <lh563566994@126.com> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -1460,9 +1461,9 @@ http_handle_dir(nni_aio *aio) sprintf(dst, "%s%s", NNG_PLATFORM_DIR_SEP, "index.html"); if (!nni_file_is_file(pn)) { pn[strlen(pn) - 1] = '\0'; // index.html -> index.htm - } - if (!nni_file_is_file(pn)) { - rv = NNG_ENOENT; + if (!nni_file_is_file(pn)) { + rv = NNG_ENOENT; + } } } |
