2
* HTTP responses header file
3
* Copyright (C) 2006-2009 Unix Solutions Ltd.
5
* Released under MIT license.
6
* See LICENSE-MIT.txt for license terms.
9
#ifndef HTTP_RESPONSE_H
10
# define HTTP_RESPONSE_H
16
void set_http_response_server_ident(char *server, char *version);
18
void send_http_response(int clientsock, const char * response);
19
void send_header_textplain(int clientsock);
21
void send_http_error(int clientsock, const char *code, const char *message);
22
void send_http_ok(int clientsock, const char *message);
23
void send_http_ok_msg(int clientsock, const char *fmt, ...);
25
void send_200_ok(int clientsock);
26
void send_302_redirect(int clientsock, const char * url);
27
void send_400_bad_request(int clientsock, const char *msg);
28
void send_403_forbidden_msg(int clientsock, const char *msg);
29
void send_403_forbidden(int clientsock);
30
void send_404_not_found(int clientsock);
31
void send_409_conflict(int clientsock, const char * msg);
32
void send_500_internal_server_error(int clientsock, const char * msg);
33
void send_501_not_implemented(int clientsock);
34
void send_504_gateway_timeout(int clientsock);