projects
/
project
/
uhttpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix container_of() on ustream callbacks
[project/uhttpd.git]
/
file.c
diff --git
a/file.c
b/file.c
index
c769c0a
..
3ac863c
100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-222,6
+222,7
@@
uh_path_lookup(struct client *cl, const char *url)
url with trailing slash appended */
if (!slash) {
uh_http_header(cl, 302, "Found");
url with trailing slash appended */
if (!slash) {
uh_http_header(cl, 302, "Found");
+ ustream_printf(cl->us, "Content-Length: 0\r\n");
ustream_printf(cl->us, "Location: %s%s%s\r\n\r\n",
&path_phys[docroot_len],
p.query ? "?" : "",
ustream_printf(cl->us, "Location: %s%s%s\r\n\r\n",
&path_phys[docroot_len],
p.query ? "?" : "",
@@
-556,6
+557,8
@@
static void uh_file_data(struct client *cl, struct path_info *pi, int fd)
!uh_file_if_range(cl, &pi->stat) ||
!uh_file_if_unmodified_since(cl, &pi->stat) ||
!uh_file_if_none_match(cl, &pi->stat)) {
!uh_file_if_range(cl, &pi->stat) ||
!uh_file_if_unmodified_since(cl, &pi->stat) ||
!uh_file_if_none_match(cl, &pi->stat)) {
+ ustream_printf(cl->us, "Content-Length: 0\r\n");
+ ustream_printf(cl->us, "\r\n");
uh_request_done(cl);
close(fd);
return;
uh_request_done(cl);
close(fd);
return;