aboutsummaryrefslogtreecommitdiff
path: root/src/examples/demo_https.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/demo_https.c')
-rw-r--r--src/examples/demo_https.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c
index c74a0252..1dff3ee9 100644
--- a/src/examples/demo_https.c
+++ b/src/examples/demo_https.c
@@ -699,8 +699,9 @@ generate_page (void *cls,
699 ('/' != url[1]) ) 699 ('/' != url[1]) )
700 { 700 {
701 fd = open (&url[1], O_RDONLY); 701 fd = open (&url[1], O_RDONLY);
702 if ( (0 != fstat (fd, &buf)) || 702 if ( (-1 != fd) &&
703 (! S_ISREG (buf.st_mode)) ) 703 ( (0 != fstat (fd, &buf)) ||
704 (! S_ISREG (buf.st_mode)) ) )
704 { 705 {
705 (void) close (fd); 706 (void) close (fd);
706 fd = -1; 707 fd = -1;