|
|
| version 1.331, 2020/12/15 20:57:56 | version 1.334, 2020/12/16 11:15:49 |
|---|---|
| Line 14 volatile const char * IDENT_PARSER3_C="$ | Line 14 volatile const char * IDENT_PARSER3_C="$ |
| #include "pa_common.h" | #include "pa_common.h" |
| #include "pa_request.h" | #include "pa_request.h" |
| #include "pa_version.h" | #include "pa_version.h" |
| #include "pa_threads.h" | |
| #include "pa_vconsole.h" | #include "pa_vconsole.h" |
| #include "pa_sapi_info.h" | #include "pa_sapi_info.h" |
| Line 58 static const char* filespec_4log = NULL; | Line 59 static const char* filespec_4log = NULL; |
| // SAPI | // SAPI |
| static void log(const char* fmt, va_list args) { | void log(const char* fmt, va_list args) { |
| bool opened=false; | bool opened=false; |
| FILE *f=0; | FILE *f=0; |
| Line 98 static void log(const char* fmt, va_list | Line 99 static void log(const char* fmt, va_list |
| time_t t=time(0); | time_t t=time(0); |
| if(const char* stamp=ctime(&t)) { // never saw that | if(const char* stamp=ctime(&t)) { // never saw that |
| if(size_t len=strlen(stamp)) // saw once stamp being ="" | if(size_t len=strlen(stamp)) // saw once stamp being ="" |
| fprintf(f, "[%.*s] [%u] ", (int)len-1, stamp, (unsigned int)getpid() ); | fprintf(f, "[%.*s] [%u] ", (int)len-1, stamp, (unsigned int)pa_get_thread_id() ); |
| } | } |
| // message | // message |
| Line 316 static void connection_handler(SAPI_Info | Line 317 static void connection_handler(SAPI_Info |
| try { | try { |
| memset(&request_info, 0, sizeof(request_info)); | memset(&request_info, 0, sizeof(request_info)); |
| connection.read_header(); | if(connection.read_header()) |
| return; // ignore "void" connections | |
| info.populate_env(); | info.populate_env(); |
| char document_root_buf[MAX_STRING]; | char document_root_buf[MAX_STRING]; |