Skip to content

Commit

Permalink
file: fix bug: send "Content-Range" error
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Jan 19, 2021
1 parent d659ff4 commit f2c55af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ void serve_file(struct uh_connection *conn)
conn->printf(conn, "Content-Length: %zu\r\n", end - start + 1);

if (ranged)
conn->printf(conn, "Content-Range: bytes %zu-%zu/%"PRIx64"\r\n", start, end, (uint64_t)st.st_size);
conn->printf(conn, "Content-Range: bytes %zu-%zu/%" PRIu64 "\r\n", start, end, (uint64_t)st.st_size);
else
file_if_gzip(conn, fullpath, mime);

Expand Down

0 comments on commit f2c55af

Please sign in to comment.