diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index e4eb9fd0..c95b9176 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -40,7 +40,7 @@ | |||
40 | static int | 40 | static int |
41 | add_response_entry (struct MHD_Response *response, | 41 | add_response_entry (struct MHD_Response *response, |
42 | enum MHD_ValueKind kind, | 42 | enum MHD_ValueKind kind, |
43 | const char *header, | 43 | const char *header, |
44 | const char *content) | 44 | const char *content) |
45 | { | 45 | { |
46 | struct MHD_HTTP_Header *hdr; | 46 | struct MHD_HTTP_Header *hdr; |
@@ -54,7 +54,7 @@ add_response_entry (struct MHD_Response *response, | |||
54 | (NULL != strchr (header, '\r')) || | 54 | (NULL != strchr (header, '\r')) || |
55 | (NULL != strchr (header, '\n')) || | 55 | (NULL != strchr (header, '\n')) || |
56 | (NULL != strchr (content, '\t')) || | 56 | (NULL != strchr (content, '\t')) || |
57 | (NULL != strchr (content, '\r')) || | 57 | (NULL != strchr (content, '\r')) || |
58 | (NULL != strchr (content, '\n')) ) | 58 | (NULL != strchr (content, '\n')) ) |
59 | return MHD_NO; | 59 | return MHD_NO; |
60 | if (NULL == (hdr = malloc (sizeof (struct MHD_HTTP_Header)))) | 60 | if (NULL == (hdr = malloc (sizeof (struct MHD_HTTP_Header)))) |
@@ -197,7 +197,7 @@ MHD_get_response_headers (struct MHD_Response *response, | |||
197 | * @ingroup response | 197 | * @ingroup response |
198 | */ | 198 | */ |
199 | const char * | 199 | const char * |
200 | MHD_get_response_header (struct MHD_Response *response, | 200 | MHD_get_response_header (struct MHD_Response *response, |
201 | const char *key) | 201 | const char *key) |
202 | { | 202 | { |
203 | struct MHD_HTTP_Header *pos; | 203 | struct MHD_HTTP_Header *pos; |
@@ -261,7 +261,7 @@ MHD_create_response_from_callback (uint64_t size, | |||
261 | /** | 261 | /** |
262 | * Given a file descriptor, read data from the file | 262 | * Given a file descriptor, read data from the file |
263 | * to generate the response. | 263 | * to generate the response. |
264 | * | 264 | * |
265 | * @param cls pointer to the response | 265 | * @param cls pointer to the response |
266 | * @param pos offset in the file to access | 266 | * @param pos offset in the file to access |
267 | * @param buf where to write the data | 267 | * @param buf where to write the data |
@@ -276,9 +276,9 @@ file_reader (void *cls, uint64_t pos, char *buf, size_t max) | |||
276 | 276 | ||
277 | (void) lseek (response->fd, pos + response->fd_off, SEEK_SET); | 277 | (void) lseek (response->fd, pos + response->fd_off, SEEK_SET); |
278 | n = read (response->fd, buf, max); | 278 | n = read (response->fd, buf, max); |
279 | if (0 == n) | 279 | if (0 == n) |
280 | return MHD_CONTENT_READER_END_OF_STREAM; | 280 | return MHD_CONTENT_READER_END_OF_STREAM; |
281 | if (n < 0) | 281 | if (n < 0) |
282 | return MHD_CONTENT_READER_END_WITH_ERROR; | 282 | return MHD_CONTENT_READER_END_WITH_ERROR; |
283 | return n; | 283 | return n; |
284 | } | 284 | } |
@@ -309,7 +309,7 @@ free_callback (void *cls) | |||
309 | * data; will be closed when response is destroyed; | 309 | * data; will be closed when response is destroyed; |
310 | * fd should be in 'blocking' mode | 310 | * fd should be in 'blocking' mode |
311 | * @param offset offset to start reading from in the file; | 311 | * @param offset offset to start reading from in the file; |
312 | * Be careful! `off_t` may have been compiled to be a | 312 | * Be careful! `off_t` may have been compiled to be a |
313 | * 64-bit variable for MHD, in which case your application | 313 | * 64-bit variable for MHD, in which case your application |
314 | * also has to be compiled using the same options! Read | 314 | * also has to be compiled using the same options! Read |
315 | * the MHD manual for more details. | 315 | * the MHD manual for more details. |
@@ -469,7 +469,7 @@ MHD_destroy_response (struct MHD_Response *response) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | 471 | ||
472 | void | 472 | void HIDDEN_SYMBOL |
473 | MHD_increment_response_rc (struct MHD_Response *response) | 473 | MHD_increment_response_rc (struct MHD_Response *response) |
474 | { | 474 | { |
475 | pthread_mutex_lock (&response->mutex); | 475 | pthread_mutex_lock (&response->mutex); |