diff options
| -rw-r--r-- | httpd.c | 8 |
1 files changed, 8 insertions, 0 deletions
| @@ -285,6 +285,14 @@ void httpd_connection(FILE *f) | |||
| 285 | if (!xs_is_null(etag)) | 285 | if (!xs_is_null(etag)) |
| 286 | headers = xs_dict_append(headers, "etag", etag); | 286 | headers = xs_dict_append(headers, "etag", etag); |
| 287 | 287 | ||
| 288 | /* if there are any additional headers, add them */ | ||
| 289 | xs_dict *more_headers = xs_dict_get(srv_config, "http_headers"); | ||
| 290 | if (xs_type(more_headers) == XSTYPE_DICT) { | ||
| 291 | char *k, *v; | ||
| 292 | while (xs_dict_iter(&more_headers, &k, &v)) | ||
| 293 | headers = xs_dict_set(headers, k, v); | ||
| 294 | } | ||
| 295 | |||
| 288 | if (b_size == 0 && body != NULL) | 296 | if (b_size == 0 && body != NULL) |
| 289 | b_size = strlen(body); | 297 | b_size = strlen(body); |
| 290 | 298 | ||