diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2024-04-18 14:50:51 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2024-04-18 14:50:51 +0200 |
commit | 160ba08074827f0ddecaf611dd9f9b15593be9c1 (patch) | |
tree | 30a7dd67400d42a79dcaa3565cf6e100750c0163 | |
parent | b56e648b5e96f33db6d1cab9b43d613579837b04 (diff) |
Only have huge downloads (aka chunked) be application/octet-stream
-rw-r--r-- | ot_http.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -165,7 +165,7 @@ ssize_t http_sendiovecdata(const int64 sock, struct ot_workstruct *ws, int iovec | |||
165 | encoding = "Content-Encoding: bzip2\r\n"; | 165 | encoding = "Content-Encoding: bzip2\r\n"; |
166 | 166 | ||
167 | if (!(cookie->flag & STRUCT_HTTP_FLAG_CHUNKED)) | 167 | if (!(cookie->flag & STRUCT_HTTP_FLAG_CHUNKED)) |
168 | header_size = asprintf(&header, "HTTP/1.1 200 OK\r\nContent-Type: application/octet-stream\r\n%sContent-Length: %zd\r\n\r\n", encoding, size); | 168 | header_size = asprintf(&header, "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\n%sContent-Length: %zd\r\n\r\n", encoding, size); |
169 | else { | 169 | else { |
170 | if (!(cookie->flag & STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER)) { | 170 | if (!(cookie->flag & STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER)) { |
171 | header_size = | 171 | header_size = |