mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[http] const in get_header_param
This commit is contained in:
parent
e8ad0b5948
commit
74c2ebd12b
@ -299,7 +299,7 @@ a:
|
|||||||
/* Parse string param="value", return value as new string or NULL if any
|
/* Parse string param="value", return value as new string or NULL if any
|
||||||
* error. */
|
* error. */
|
||||||
char *
|
char *
|
||||||
get_header_param(char *e, char *name)
|
get_header_param(char *e, const char *name)
|
||||||
{
|
{
|
||||||
char *n, *start;
|
char *n, *start;
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ again:
|
|||||||
while (*e && c_toupper(*e++) != c_toupper(*name));
|
while (*e && c_toupper(*e++) != c_toupper(*name));
|
||||||
if (!*e) return NULL;
|
if (!*e) return NULL;
|
||||||
|
|
||||||
n = name + 1;
|
n = (char *)(name + 1);
|
||||||
while (*n && c_toupper(*e) == c_toupper(*n)) e++, n++;
|
while (*n && c_toupper(*e) == c_toupper(*n)) e++, n++;
|
||||||
if (*n) goto again;
|
if (*n) goto again;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ enum parse_header_param {
|
|||||||
|
|
||||||
char *parse_header(char *, const char *, char **);
|
char *parse_header(char *, const char *, char **);
|
||||||
enum parse_header_param parse_header_param(char *, const char *, char **, int);
|
enum parse_header_param parse_header_param(char *, const char *, char **, int);
|
||||||
char *get_header_param(char *, char *);
|
char *get_header_param(char *, const char *);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user