mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
content-type bugfixes:
http://seppia.noreply.org/tor/dir.z was being declared text/plain and http://seppia.noreply.org/tor/server/fp/719BE45DE224B607C53707D0E2143E2D423E74CF was being declared application/octet-stream svn:r5108
This commit is contained in:
parent
f011b12df2
commit
959598fae6
@ -1201,9 +1201,10 @@ directory_handle_command_get(connection_t *conn, char *headers,
|
||||
log_fn(LOG_DEBUG,"Dumping %sdirectory to client.",
|
||||
deflated?"deflated ":"");
|
||||
format_rfc1123_time(date, time(NULL));
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\nContent-Encoding: %s\r\n\r\n",
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: %s\r\nContent-Encoding: %s\r\n\r\n",
|
||||
date,
|
||||
(int)dlen,
|
||||
deflated?"application/octet-stream":"text/plain",
|
||||
deflated?"deflate":"identity");
|
||||
connection_write_to_buf(tmp, strlen(tmp), conn);
|
||||
connection_write_to_buf(cp, dlen, conn);
|
||||
@ -1224,9 +1225,10 @@ directory_handle_command_get(connection_t *conn, char *headers,
|
||||
}
|
||||
|
||||
format_rfc1123_time(date, time(NULL));
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\nContent-Encoding: %s\r\n\r\n",
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: %s\r\nContent-Encoding: %s\r\n\r\n",
|
||||
date,
|
||||
(int)dlen,
|
||||
deflated?"application/octet-stream":"text/plain",
|
||||
deflated?"deflate":"identity");
|
||||
connection_write_to_buf(tmp, strlen(tmp), conn);
|
||||
connection_write_to_buf(cp, strlen(cp), conn);
|
||||
@ -1255,9 +1257,10 @@ directory_handle_command_get(connection_t *conn, char *headers,
|
||||
SMARTLIST_FOREACH(dir_objs, cached_dir_t *, d,
|
||||
dlen += deflated?d->dir_z_len:d->dir_len);
|
||||
format_rfc1123_time(date, time(NULL));
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\nContent-Encoding: %s\r\n\r\n",
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: %s\r\nContent-Encoding: %s\r\n\r\n",
|
||||
date,
|
||||
(int)dlen,
|
||||
deflated?"application/octet-stream":"text/plain",
|
||||
deflated?"deflate":"identity");
|
||||
connection_write_to_buf(tmp, strlen(tmp), conn);
|
||||
SMARTLIST_FOREACH(dir_objs, cached_dir_t *, d,
|
||||
@ -1315,7 +1318,7 @@ directory_handle_command_get(connection_t *conn, char *headers,
|
||||
connection_write_to_buf(compressed, compressed_len, conn);
|
||||
tor_free(compressed);
|
||||
} else {
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: application/octet-stream\r\n\r\n",
|
||||
tor_snprintf(tmp, sizeof(tmp), "HTTP/1.0 200 OK\r\nDate: %s\r\nContent-Length: %d\r\nContent-Type: text/plain\r\n\r\n",
|
||||
date,
|
||||
(int)len);
|
||||
connection_write_to_buf(tmp, strlen(tmp), conn);
|
||||
|
Loading…
Reference in New Issue
Block a user