diff options
Diffstat (limited to 'src/daemon/response.c')
-rw-r--r-- | src/daemon/response.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/daemon/response.c b/src/daemon/response.c index 7fae9f90..0c4b1de4 100644 --- a/src/daemon/response.c +++ b/src/daemon/response.c @@ -126,6 +126,27 @@ MHD_get_response_headers(struct MHD_Response * response, /** + * Get a particular header from the response. + * + * @param key which header to get + * @return NULL if header does not exist + */ +const char * +MHD_get_response_header(struct MHD_Response * response, + const char * key) { + struct MHD_HTTP_Header * pos; + pos = response->first_header; + while (pos != NULL) { + if (0 == strcmp(key, + pos->header)) + return pos->value; + pos = pos->next; + } + return NULL; +} + + +/** * Create a response object. The response object can be extended with * header information and then be used any number of times. * |