a36b901d40
This turns the data-functions into the only functions "allowed" to send body-data (called with http_send_body()). The previous (hacky) approach of doing this in http_send_header() is not only out of place, it's an easy source of bugs given, for instance, the sending of body data is not expected with HEAD-requests. Given html_escape() is now only used in data.c, we move it there from util.c and make it a static method again. Signed-off-by: Laslo Hunhold <dev@frign.de>
11 lines
310 B
C
11 lines
310 B
C
/* See LICENSE file for copyright and license details. */
|
|
#ifndef DATA_H
|
|
#define DATA_H
|
|
|
|
#include "http.h"
|
|
|
|
enum status data_send_dirlisting(int, const struct response *);
|
|
enum status data_send_error(int, const struct response *);
|
|
enum status data_send_file(int, const struct response *);
|
|
|
|
#endif /* DATA_H */
|