Definition at line 55 of file webServer.c.
References BUFSIZE, dim_print_date_time(), getTime(), LOG, SORRY, sprintf(), web_write(), and WERROR.
Referenced by main(), and sendFile().
58 static char date_buffer[128];
59 static char snd_buffer[
BUFSIZE+1];
62 case WERROR: (void)printf(
"ERROR: %s:%s exiting pid=%d\n",s1, s2, getpid());
break;
64 (void)
sprintf(logbuffer,
"<HTML><BODY><H1>webDid: %s %s</H1></BODY></HTML>\r\n", s1, s2);
66 (void)printf(
"webDid: %s %s\n",s1, s2);
68 (void)
sprintf(snd_buffer,
"HTTP/1.1 200 OK\r\nDate: %s\r\nServer: DID/19.7\r\nContent-Length: %d\r\nContent-Type: %s\r\nConnection: close\r\n\r\n",
69 date_buffer, (
int)strlen(logbuffer),
"text/html");
70 (void)
web_write(conn_id,snd_buffer,(
int)strlen(snd_buffer));
71 (void)
web_write(conn_id,logbuffer,(
int)strlen(logbuffer));
73 case LOG: (void)printf(
"INFO: %s:%s:%d\n",s1, s2,conn_id);
void getTime(char *buffer)
void dim_print_date_time()
sprintf(name1,"NewService%d", i)