1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04: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 * static char *
init_data_protocol_header(struct cache_entry *cached, init_data_protocol_header(struct cache_entry *cached,
char *type, int typelen) const char *type_, int typelen)
{ {
char *head; char *head;
char *type;
assert(typelen); assert(typelen);
type = memacpy(type, typelen); type = memacpy(type_, typelen);
if (!type) return NULL; if (!type) return NULL;
/* Set fake content type */ /* Set fake content type */
@ -87,7 +88,7 @@ parse_data_protocol_header(struct connection *conn, int *base64)
{ {
struct uri *uri = conn->uri; struct uri *uri = conn->uri;
char *end = (char *)memchr(uri->data, ',', uri->datalen); 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; int typelen = sizeof(DEFAULT_DATA_MEDIATYPE) - 1;
if (end) { if (end) {