diff options
| author | ame <[email protected]> | 2024-09-30 02:06:47 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-09-30 02:06:47 -0500 |
| commit | 2a7f5c95a5406b6de215dbc24a733e29d609d20f (patch) | |
| tree | 6409e4b3c43b17e9c73d2b29193450712fb63190 /src/net.c | |
| parent | e9cb2e0f75cbfa6bde188b9e043ebfd8d30b9451 (diff) | |
cookies, sendfile fixes, and local var tests
Diffstat (limited to 'src/net.c')
| -rw-r--r-- | src/net.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -43,12 +43,12 @@ void* handle_client(void *_arg){ //read full request
//time_start(recv)
int64_t bytes_received = recv_full_buffer(client_fd, &buffer, &header_eof, &read_state);
- /*
- for(int i = 0; i != header_eof; i++)
+
+ /*for(int i = 0; i != header_eof; i++)
putchar(buffer[i]);
- putchar('\n');
- printf("hi %li:%i\n", bytes_received,header_eof);
- */
+ putchar('\n');*/
+ //printf("hi %li:%i\n", bytes_received,header_eof);
+
//ignore if header is just fucked
if(bytes_received >= -1){
parray_t* table;
@@ -104,12 +104,12 @@ void* handle_client(void *_arg){ //handle cookies
//TODO: enable and test with valgrind
- if(0 && sC != NULL){
+ if(sC != NULL){
lua_newtable(L);
int lcookie = lua_gettop(L);
parray_t* cookie = parray_init();
- //printf("%i\n",gen_parse(sC->c, sC->len, &cookie));
+ gen_parse(sC->c, sC->len, &cookie);
for(int i = 0; i != cookie->len; i++){
//printf("%s %s\n", cookie->P[i].key->c, ((str*)cookie->P[i].value)->c);
luaI_tsetsl(L, lcookie, cookie->P[i].key->c, ((str*)cookie->P[i].value)->c, ((str*)cookie->P[i].value)->len);
|
