aboutsummaryrefslogtreecommitdiff
path: root/src/net/luai.h
blob: 54526700d33b740c266bcafb8a7d45e94394fe8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "common.h"

void i_write_header(lua_State* L, int header_top, str** _resp, char* content, size_t len);

/**
 * @brief parses all files in response buffer into a lua table
 *
 * @param {lua_State*} lua state to put table into
 * @param {char*} response buffer
 * @param {str*} response header Content-Type value
 * @return {int} lua index of table
*/
int rolling_file_parse(lua_State* L, int* files_idx, int* body_idx, char* buffer, str* content_type, size_t blen, struct file_parse* _content);