comparison seobeo/s_web.c @ 91:19cccf6e866a

Added Epi photo reels.
author June Park <parkjune1995@gmail.com>
date Thu, 01 Jan 2026 16:34:51 -0800
parents 1ded13720541
children 655ea0b661fd
comparison
equal deleted inserted replaced
90:1aeee370837b 91:19cccf6e866a
1 #include "seobeo/seobeo.h" 1 #include "seobeo/seobeo.h"
2 2
3 // Global folder path for serving files 3 // Global folder path for serving files
4 static char g_folder_path[512] = "."; 4 static char g_folder_path[512] = ".";
5 5
6 int Seobeo_Web_GenerateRequestHeader(void *buffer, const char *host, 6 int Seobeo_Web_GenerateRequestHeader(
7 const char *path) 7 void *buffer, const char *host,
8 const char *path)
8 { 9 {
9 return sprintf( 10 return sprintf(
10 buffer, 11 buffer,
11 "GET %s HTTP/1.1\r\n" 12 "GET %s HTTP/1.1\r\n"
12 "Host: %s\r\n" 13 "Host: %s\r\n"
506 perror("Seobeo_Handle_Flush"); 507 perror("Seobeo_Handle_Flush");
507 Seobeo_Handle_Destroy(h); 508 Seobeo_Handle_Destroy(h);
508 return -1; 509 return -1;
509 } 510 }
510 511
511 // Response
512 size_t cap = 1024*8, used = 0; 512 size_t cap = 1024*8, used = 0;
513 char *p_request_body = Dowa_Arena_Allocate(p_request_arena, cap); 513 char *p_request_body = Dowa_Arena_Allocate(p_request_arena, cap);
514 if (!p_request_body) { Seobeo_Handle_Destroy(h); return -1; } 514 if (!p_request_body) { Seobeo_Handle_Destroy(h); return -1; }
515 515
516 while (1) 516 while (1)