about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'WWW/Library/Implementation/HTFile.c')
-rw-r--r--WWW/Library/Implementation/HTFile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index b5ad32af..4ecf8820 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -2510,7 +2510,14 @@ PUBLIC int HTLoadFile ARGS4(
 		FREE(nodename);
 		return status;	/* document loaded, maybe partial */
 
-	   } /* end if localname is a directory */
+	    } /* end if localname is a directory */
+
+	    if (S_ISREG(dir_info.st_mode)) {
+#ifdef INT_MAX
+		if (dir_info.st_size <= INT_MAX)
+#endif
+		    anchor->content_length = dir_info.st_size;
+	    }
 
 	} /* end if file stat worked */