diff options
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r-- | src/microhttpd/response.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index c604e14e..8ac0c58e 100644 --- a/src/microhttpd/response.c +++ b/src/microhttpd/response.c | |||
@@ -159,7 +159,7 @@ add_response_entry (struct MHD_Response *response, | |||
159 | const char *header, | 159 | const char *header, |
160 | const char *content) | 160 | const char *content) |
161 | { | 161 | { |
162 | struct MHD_HTTP_Header *hdr; | 162 | struct MHD_HTTP_Res_Header *hdr; |
163 | 163 | ||
164 | if ( (NULL == response) || | 164 | if ( (NULL == response) || |
165 | (NULL == header) || | 165 | (NULL == header) || |
@@ -173,7 +173,7 @@ add_response_entry (struct MHD_Response *response, | |||
173 | (NULL != strchr (content, '\r')) || | 173 | (NULL != strchr (content, '\r')) || |
174 | (NULL != strchr (content, '\n')) ) | 174 | (NULL != strchr (content, '\n')) ) |
175 | return MHD_NO; | 175 | return MHD_NO; |
176 | if (NULL == (hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Header)))) | 176 | if (NULL == (hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Res_Header)))) |
177 | return MHD_NO; | 177 | return MHD_NO; |
178 | if (NULL == (hdr->header = strdup (header))) | 178 | if (NULL == (hdr->header = strdup (header))) |
179 | { | 179 | { |
@@ -218,7 +218,7 @@ add_response_header_connection (struct MHD_Response *response, | |||
218 | size_t buf_size; /**< the size of the buffer */ | 218 | size_t buf_size; /**< the size of the buffer */ |
219 | ssize_t norm_len; /**< the length of the normalised value */ | 219 | ssize_t norm_len; /**< the length of the normalised value */ |
220 | char *buf; /**< the temporal buffer */ | 220 | char *buf; /**< the temporal buffer */ |
221 | struct MHD_HTTP_Header *hdr; /**< existing "Connection" header */ | 221 | struct MHD_HTTP_Res_Header *hdr; /**< existing "Connection" header */ |
222 | bool value_has_close; /**< the @a value has "close" token */ | 222 | bool value_has_close; /**< the @a value has "close" token */ |
223 | bool already_has_close; /**< existing "Connection" header has "close" token */ | 223 | bool already_has_close; /**< existing "Connection" header has "close" token */ |
224 | size_t pos = 0; /**< position of addition in the @a buf */ | 224 | size_t pos = 0; /**< position of addition in the @a buf */ |
@@ -340,9 +340,9 @@ add_response_header_connection (struct MHD_Response *response, | |||
340 | 340 | ||
341 | if (NULL == hdr) | 341 | if (NULL == hdr) |
342 | { | 342 | { |
343 | struct MHD_HTTP_Header *new_hdr; /**< new "Connection" header */ | 343 | struct MHD_HTTP_Res_Header *new_hdr; /**< new "Connection" header */ |
344 | /* Create new response header entry */ | 344 | /* Create new response header entry */ |
345 | new_hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Header)); | 345 | new_hdr = MHD_calloc_ (1, sizeof (struct MHD_HTTP_Res_Header)); |
346 | if (NULL != new_hdr) | 346 | if (NULL != new_hdr) |
347 | { | 347 | { |
348 | new_hdr->header = malloc (key_len + 1); | 348 | new_hdr->header = malloc (key_len + 1); |
@@ -390,7 +390,7 @@ static enum MHD_Result | |||
390 | del_response_header_connection (struct MHD_Response *response, | 390 | del_response_header_connection (struct MHD_Response *response, |
391 | const char *value) | 391 | const char *value) |
392 | { | 392 | { |
393 | struct MHD_HTTP_Header *hdr; /**< existing "Connection" header */ | 393 | struct MHD_HTTP_Res_Header *hdr; /**< existing "Connection" header */ |
394 | 394 | ||
395 | hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND, | 395 | hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND, |
396 | MHD_HTTP_HEADER_CONNECTION, | 396 | MHD_HTTP_HEADER_CONNECTION, |
@@ -522,7 +522,7 @@ MHD_add_response_header (struct MHD_Response *response, | |||
522 | { | 522 | { |
523 | if (0 != (response->flags_auto & MHD_RAF_HAS_DATE_HDR)) | 523 | if (0 != (response->flags_auto & MHD_RAF_HAS_DATE_HDR)) |
524 | { | 524 | { |
525 | struct MHD_HTTP_Header *hdr; | 525 | struct MHD_HTTP_Res_Header *hdr; |
526 | hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND, | 526 | hdr = MHD_get_response_element_n_ (response, MHD_HEADER_KIND, |
527 | MHD_HTTP_HEADER_DATE, | 527 | MHD_HTTP_HEADER_DATE, |
528 | MHD_STATICSTR_LEN_ ( \ | 528 | MHD_STATICSTR_LEN_ ( \ |
@@ -615,7 +615,7 @@ MHD_del_response_header (struct MHD_Response *response, | |||
615 | const char *header, | 615 | const char *header, |
616 | const char *content) | 616 | const char *content) |
617 | { | 617 | { |
618 | struct MHD_HTTP_Header *pos; | 618 | struct MHD_HTTP_Res_Header *pos; |
619 | size_t header_len; | 619 | size_t header_len; |
620 | size_t content_len; | 620 | size_t content_len; |
621 | 621 | ||
@@ -698,7 +698,7 @@ MHD_get_response_headers (struct MHD_Response *response, | |||
698 | void *iterator_cls) | 698 | void *iterator_cls) |
699 | { | 699 | { |
700 | int numHeaders = 0; | 700 | int numHeaders = 0; |
701 | struct MHD_HTTP_Header *pos; | 701 | struct MHD_HTTP_Res_Header *pos; |
702 | 702 | ||
703 | for (pos = response->first_header; | 703 | for (pos = response->first_header; |
704 | NULL != pos; | 704 | NULL != pos; |
@@ -728,7 +728,7 @@ const char * | |||
728 | MHD_get_response_header (struct MHD_Response *response, | 728 | MHD_get_response_header (struct MHD_Response *response, |
729 | const char *key) | 729 | const char *key) |
730 | { | 730 | { |
731 | struct MHD_HTTP_Header *pos; | 731 | struct MHD_HTTP_Res_Header *pos; |
732 | size_t key_size; | 732 | size_t key_size; |
733 | 733 | ||
734 | if (NULL == key) | 734 | if (NULL == key) |
@@ -758,13 +758,13 @@ MHD_get_response_header (struct MHD_Response *response, | |||
758 | * @return NULL if header element does not exist | 758 | * @return NULL if header element does not exist |
759 | * @ingroup response | 759 | * @ingroup response |
760 | */ | 760 | */ |
761 | struct MHD_HTTP_Header * | 761 | struct MHD_HTTP_Res_Header * |
762 | MHD_get_response_element_n_ (struct MHD_Response *response, | 762 | MHD_get_response_element_n_ (struct MHD_Response *response, |
763 | enum MHD_ValueKind kind, | 763 | enum MHD_ValueKind kind, |
764 | const char *key, | 764 | const char *key, |
765 | size_t key_len) | 765 | size_t key_len) |
766 | { | 766 | { |
767 | struct MHD_HTTP_Header *pos; | 767 | struct MHD_HTTP_Res_Header *pos; |
768 | 768 | ||
769 | mhd_assert (NULL != key); | 769 | mhd_assert (NULL != key); |
770 | mhd_assert (0 != key[0]); | 770 | mhd_assert (0 != key[0]); |
@@ -806,7 +806,7 @@ MHD_check_response_header_token_ci (const struct MHD_Response *response, | |||
806 | const char *token, | 806 | const char *token, |
807 | size_t token_len) | 807 | size_t token_len) |
808 | { | 808 | { |
809 | struct MHD_HTTP_Header *pos; | 809 | struct MHD_HTTP_Res_Header *pos; |
810 | 810 | ||
811 | if ( (NULL == key) || | 811 | if ( (NULL == key) || |
812 | ('\0' == key[0]) || | 812 | ('\0' == key[0]) || |
@@ -2041,7 +2041,7 @@ MHD_create_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, | |||
2041 | void | 2041 | void |
2042 | MHD_destroy_response (struct MHD_Response *response) | 2042 | MHD_destroy_response (struct MHD_Response *response) |
2043 | { | 2043 | { |
2044 | struct MHD_HTTP_Header *pos; | 2044 | struct MHD_HTTP_Res_Header *pos; |
2045 | 2045 | ||
2046 | if (NULL == response) | 2046 | if (NULL == response) |
2047 | return; | 2047 | return; |