Lines Matching refs:response
469 _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; in request_handler_entries() local
506 …response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_entries, m, … in request_handler_entries()
507 if (!response) in request_handler_entries()
510 if (MHD_add_response_header(response, "Content-Type", mime_types[m->mode]) == MHD_NO) in request_handler_entries()
513 return MHD_queue_response(connection, MHD_HTTP_OK, response); in request_handler_entries()
618 _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; in request_handler_fields() local
636 …response = MHD_create_response_from_callback(MHD_SIZE_UNKNOWN, 4*1024, request_reader_fields, m, N… in request_handler_fields()
637 if (!response) in request_handler_fields()
640 …if (MHD_add_response_header(response, "Content-Type", mime_types[m->mode == OUTPUT_JSON ? OUTPUT_J… in request_handler_fields()
643 return MHD_queue_response(connection, MHD_HTTP_OK, response); in request_handler_fields()
651 _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; in request_handler_redirect() local
659 response = MHD_create_response_from_buffer(strlen(page), page, MHD_RESPMEM_MUST_FREE); in request_handler_redirect()
660 if (!response) in request_handler_redirect()
664 if (MHD_add_response_header(response, "Content-Type", "text/html") == MHD_NO || in request_handler_redirect()
665 MHD_add_response_header(response, "Location", target) == MHD_NO) in request_handler_redirect()
668 return MHD_queue_response(connection, MHD_HTTP_MOVED_PERMANENTLY, response); in request_handler_redirect()
676 _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; in request_handler_file() local
691 response = MHD_create_response_from_fd_at_offset64(st.st_size, fd, 0); in request_handler_file()
692 if (!response) in request_handler_file()
696 if (MHD_add_response_header(response, "Content-Type", mime_type) == MHD_NO) in request_handler_file()
699 return MHD_queue_response(connection, MHD_HTTP_OK, response); in request_handler_file()
736 _cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL; in request_handler_machine() local
794 response = MHD_create_response_from_buffer(strlen(json), json, MHD_RESPMEM_MUST_FREE); in request_handler_machine()
795 if (!response) in request_handler_machine()
799 if (MHD_add_response_header(response, "Content-Type", "application/json") == MHD_NO) in request_handler_machine()
802 return MHD_queue_response(connection, MHD_HTTP_OK, response); in request_handler_machine()