aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/response.c')
-rw-r--r--src/daemon/response.c21
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,
126 126
127 127
128/** 128/**
129 * Get a particular header from the response.
130 *
131 * @param key which header to get
132 * @return NULL if header does not exist
133 */
134const char *
135MHD_get_response_header(struct MHD_Response * response,
136 const char * key) {
137 struct MHD_HTTP_Header * pos;
138 pos = response->first_header;
139 while (pos != NULL) {
140 if (0 == strcmp(key,
141 pos->header))
142 return pos->value;
143 pos = pos->next;
144 }
145 return NULL;
146}
147
148
149/**
129 * Create a response object. The response object can be extended with 150 * Create a response object. The response object can be extended with
130 * header information and then be used any number of times. 151 * header information and then be used any number of times.
131 * 152 *