chore: de-dunder http_response

main
Sean McBride 5 years ago
parent 06de754885
commit 3e90b26243

@ -150,7 +150,7 @@ current_sandbox_get_http_request_body(char **body)
static inline int static inline int
current_sandbox_set_http_response_header(char *header, int length) current_sandbox_set_http_response_header(char *header, int length)
{ {
return http_response__set_header(&current_sandbox_get()->http_response, header, length); return http_response_set_header(&current_sandbox_get()->http_response, header, length);
} }
/** /**
@ -162,7 +162,7 @@ current_sandbox_set_http_response_header(char *header, int length)
static inline int static inline int
current_sandbox_set_http_response_body(char *body, int length) current_sandbox_set_http_response_body(char *body, int length)
{ {
return http_response__set_body(&current_sandbox_get()->http_response, body, length); return http_response_set_body(&current_sandbox_get()->http_response, body, length);
} }
/** /**
@ -174,7 +174,7 @@ current_sandbox_set_http_response_body(char *body, int length)
static inline int static inline int
current_sandbox_set_http_response_status(char *status, int length) current_sandbox_set_http_response_status(char *status, int length)
{ {
return http_response__set_status(&current_sandbox_get()->http_response, status, length); return http_response_set_status(&current_sandbox_get()->http_response, status, length);
} }
/** /**
@ -184,7 +184,7 @@ current_sandbox_set_http_response_status(char *status, int length)
static inline int static inline int
current_sandbox_vectorize_http_response(void) current_sandbox_vectorize_http_response(void)
{ {
return http_response__encode_as_vector(&current_sandbox_get()->http_response); return http_response_encode_as_vector(&current_sandbox_get()->http_response);
} }

@ -32,9 +32,9 @@ struct http_response {
/*************************************************** /***************************************************
* General HTTP Response Functions * * General HTTP Response Functions *
**************************************************/ **************************************************/
int http_response__encode_as_vector(struct http_response *http_response); int http_response_encode_as_vector(struct http_response *http_response);
int http_response__set_body(struct http_response *http_response, char *body, int length); int http_response_set_body(struct http_response *http_response, char *body, int length);
int http_response__set_header(struct http_response *http_response, char *h, int length); int http_response_set_header(struct http_response *http_response, char *h, int length);
int http_response__set_status(struct http_response *http_response, char *status, int length); int http_response_set_status(struct http_response *http_response, char *status, int length);
#endif /* SFRT_HTTP_RESPONSE_H */ #endif /* SFRT_HTTP_RESPONSE_H */

@ -14,7 +14,7 @@
* @returns the number of buffers used to store the HTTP Response * @returns the number of buffers used to store the HTTP Response
**/ **/
int int
http_response__encode_as_vector(struct http_response *http_response) http_response_encode_as_vector(struct http_response *http_response)
{ {
int buffer_count = 0; int buffer_count = 0;
@ -69,7 +69,7 @@ http_response__encode_as_vector(struct http_response *http_response)
* @returns 0 (abends program in case of error) * @returns 0 (abends program in case of error)
**/ **/
int int
http_response__set_body(struct http_response *http_response, char *body, int length) http_response_set_body(struct http_response *http_response, char *body, int length)
{ {
// assert(length <= sandbox->module->max_response_size); // assert(length <= sandbox->module->max_response_size);
http_response->body = body; http_response->body = body;
@ -86,7 +86,7 @@ http_response__set_body(struct http_response *http_response, char *body, int len
* @returns 0 (abends program in case of error) * @returns 0 (abends program in case of error)
**/ **/
int int
http_response__set_header(struct http_response *http_response, char *header, int length) http_response_set_header(struct http_response *http_response, char *header, int length)
{ {
assert(http_response->header_count < HTTP__MAX_HEADER_COUNT); assert(http_response->header_count < HTTP__MAX_HEADER_COUNT);
http_response->header_count++; http_response->header_count++;
@ -104,7 +104,7 @@ http_response__set_header(struct http_response *http_response, char *header, int
* @returns 0 (abends program in case of error) * @returns 0 (abends program in case of error)
**/ **/
int int
http_response__set_status(struct http_response *http_response, char *status, int length) http_response_set_status(struct http_response *http_response, char *status, int length)
{ {
http_response->status = status; http_response->status = status;
http_response->status_length = length; http_response->status_length = length;

Loading…
Cancel
Save