Esempio n. 1
0
int httptime(char *buf, int size) { return httptime(time(0), buf, size); }
Esempio n. 2
0
int httptime(time_t t, char *buf, int size) { struct tm tm; GMTtm(t, &tm); return httptime(&tm, buf, size); }
 HTTPServer::Response Request(Connection *, int method, const char *url, const char *args, const char *headers, const char *postdata, int postlen) {
   char time[32]; httptime(time, sizeof(time));
   snprintf(response, sizeof(response), "<html><h1>Spaceball Server %s</h1></html>\r\n", time);
   return HTTPServer::Response("text/html; charset=UTF-8", response);
 }