1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-20 00:15:31 +00:00

[data] const type

This commit is contained in:
Witold Filipczyk 2022-02-21 17:52:17 +01:00
parent 3930d6a89a
commit 18d0a9cd9c

View File

@ -63,13 +63,14 @@
static char *
init_data_protocol_header(struct cache_entry *cached,
char *type, int typelen)
const char *type_, int typelen)
{
char *head;
char *type;
assert(typelen);
type = memacpy(type, typelen);
type = memacpy(type_, typelen);
if (!type) return NULL;
/* Set fake content type */
@ -87,7 +88,7 @@ parse_data_protocol_header(struct connection *conn, int *base64)
{
struct uri *uri = conn->uri;
char *end = (char *)memchr(uri->data, ',', uri->datalen);
char *type = DEFAULT_DATA_MEDIATYPE;
const char *type = DEFAULT_DATA_MEDIATYPE;
int typelen = sizeof(DEFAULT_DATA_MEDIATYPE) - 1;
if (end) {