diff options
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -125,7 +125,7 @@ static xs_str *greeting_html(void) | |||
| 125 | 125 | ||
| 126 | /* does it have a %userlist% mark? */ | 126 | /* does it have a %userlist% mark? */ |
| 127 | if (xs_str_in(s, "%userlist%") != -1) { | 127 | if (xs_str_in(s, "%userlist%") != -1) { |
| 128 | char *host = xs_dict_get(srv_config, "host"); | 128 | const char *host = xs_dict_get(srv_config, "host"); |
| 129 | xs *list = user_list(); | 129 | xs *list = user_list(); |
| 130 | xs_list *p = list; | 130 | xs_list *p = list; |
| 131 | xs_str *uid; | 131 | xs_str *uid; |
| @@ -171,14 +171,14 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 171 | 171 | ||
| 172 | /* is it the server root? */ | 172 | /* is it the server root? */ |
| 173 | if (*q_path == '\0') { | 173 | if (*q_path == '\0') { |
| 174 | xs_dict *q_vars = xs_dict_get(req, "q_vars"); | 174 | const xs_dict *q_vars = xs_dict_get(req, "q_vars"); |
| 175 | char *t = NULL; | 175 | const char *t = NULL; |
| 176 | 176 | ||
| 177 | if (xs_type(q_vars) == XSTYPE_DICT && (t = xs_dict_get(q_vars, "t"))) { | 177 | if (xs_type(q_vars) == XSTYPE_DICT && (t = xs_dict_get(q_vars, "t"))) { |
| 178 | /** search by tag **/ | 178 | /** search by tag **/ |
| 179 | int skip = 0; | 179 | int skip = 0; |
| 180 | int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries")); | 180 | int show = xs_number_get(xs_dict_get(srv_config, "max_timeline_entries")); |
| 181 | char *v; | 181 | const char *v; |
| 182 | 182 | ||
| 183 | if ((v = xs_dict_get(q_vars, "skip")) != NULL) | 183 | if ((v = xs_dict_get(q_vars, "skip")) != NULL) |
| 184 | skip = atoi(v); | 184 | skip = atoi(v); |
| @@ -193,7 +193,7 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 193 | more = 1; | 193 | more = 1; |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | char *accept = xs_dict_get(req, "accept"); | 196 | const char *accept = xs_dict_get(req, "accept"); |
| 197 | if (!xs_is_null(accept) && strcmp(accept, "application/rss+xml") == 0) { | 197 | if (!xs_is_null(accept) && strcmp(accept, "application/rss+xml") == 0) { |
| 198 | xs *link = xs_fmt("%s/?t=%s", srv_baseurl, t); | 198 | xs *link = xs_fmt("%s/?t=%s", srv_baseurl, t); |
| 199 | 199 | ||
| @@ -268,7 +268,7 @@ void httpd_connection(FILE *f) | |||
| 268 | /* the connection processor */ | 268 | /* the connection processor */ |
| 269 | { | 269 | { |
| 270 | xs *req; | 270 | xs *req; |
| 271 | char *method; | 271 | const char *method; |
| 272 | int status = 0; | 272 | int status = 0; |
| 273 | xs_str *body = NULL; | 273 | xs_str *body = NULL; |
| 274 | int b_size = 0; | 274 | int b_size = 0; |
| @@ -278,7 +278,7 @@ void httpd_connection(FILE *f) | |||
| 278 | xs *payload = NULL; | 278 | xs *payload = NULL; |
| 279 | xs *etag = NULL; | 279 | xs *etag = NULL; |
| 280 | int p_size = 0; | 280 | int p_size = 0; |
| 281 | char *p; | 281 | const char *p; |
| 282 | int fcgi_id; | 282 | int fcgi_id; |
| 283 | 283 | ||
| 284 | if (p_state->use_fcgi) | 284 | if (p_state->use_fcgi) |
| @@ -411,7 +411,7 @@ void httpd_connection(FILE *f) | |||
| 411 | headers = xs_dict_append(headers, "etag", etag); | 411 | headers = xs_dict_append(headers, "etag", etag); |
| 412 | 412 | ||
| 413 | /* if there are any additional headers, add them */ | 413 | /* if there are any additional headers, add them */ |
| 414 | xs_dict *more_headers = xs_dict_get(srv_config, "http_headers"); | 414 | const xs_dict *more_headers = xs_dict_get(srv_config, "http_headers"); |
| 415 | if (xs_type(more_headers) == XSTYPE_DICT) { | 415 | if (xs_type(more_headers) == XSTYPE_DICT) { |
| 416 | char *k, *v; | 416 | char *k, *v; |
| 417 | int c = 0; | 417 | int c = 0; |