2008-08-05 15:08:32 +00:00
|
|
|
#ifndef _LIGHTTPD_UTILS_H_
|
|
|
|
#define _LIGHTTPD_UTILS_H_
|
|
|
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
|
|
|
LI_API void fatal(const gchar* msg);
|
|
|
|
|
|
|
|
/* set O_NONBLOCK and FD_CLOEXEC */
|
|
|
|
LI_API void fd_init(int fd);
|
2008-08-06 18:46:42 +00:00
|
|
|
LI_API void ev_io_add_events(struct ev_loop *loop, ev_io *watcher, int events);
|
|
|
|
LI_API void ev_io_rem_events(struct ev_loop *loop, ev_io *watcher, int events);
|
|
|
|
LI_API void ev_io_set_events(struct ev_loop *loop, ev_io *watcher, int events);
|
2008-08-05 15:08:32 +00:00
|
|
|
|
2008-08-09 15:20:12 +00:00
|
|
|
|
|
|
|
/* URL inplace decode: replace %XX with character \xXX; replace control characters with '_' (< 32 || == 127) */
|
|
|
|
LI_API void url_decode(GString *path);
|
|
|
|
|
|
|
|
LI_API void path_simplify(GString *path);
|
|
|
|
|
2008-08-13 00:18:35 +00:00
|
|
|
LI_API gchar *http_status_string(guint status_code);
|
|
|
|
|
2008-08-13 23:05:15 +00:00
|
|
|
/* */
|
|
|
|
LI_API gchar counter_format(guint64 *count, guint factor);
|
|
|
|
|
2008-08-15 16:21:21 +00:00
|
|
|
LI_API gchar *ev_backend_string(guint backend);
|
|
|
|
|
2008-09-24 21:55:20 +00:00
|
|
|
LI_API void string_destroy_notify(gpointer str);
|
|
|
|
|
2008-08-05 15:08:32 +00:00
|
|
|
#endif
|