Changeset 3937
- Timestamp:
- 11/19/10 19:53:42 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-http-helpers.c
r3930 r3937 408 408 409 409 sprintf(buf, "%s %d %s\r\n", PROTOCOL, status, title); 410 sprintf(buf , "Server: %s\r\n", SERVER);410 sprintf(buf+strlen(buf), "Server: %s\r\n", SERVER); 411 411 412 412 now = time(NULL); 413 413 strftime(timebuf, sizeof(timebuf), RFC1123FMT, gmtime(&now)); 414 sprintf(buf , "Date: %s\r\n", timebuf);414 sprintf(buf+strlen(buf), "Date: %s\r\n", timebuf); 415 415 416 416 if (extra) 417 sprintf(buf , "%s\r\n", extra);417 sprintf(buf+strlen(buf), "%s\r\n", extra); 418 418 419 419 if (mime) 420 sprintf(buf , "Content-Type: %s\r\n", mime);420 sprintf(buf+strlen(buf), "Content-Type: %s\r\n", mime); 421 421 422 422 strftime(timebuf, sizeof(timebuf), RFC1123FMT, gmtime(&now)); 423 sprintf(buf , "Cache-Control: no-store, no-cache, must-revalidate\r\n");424 sprintf(buf , "Expires: Sat, 26 Jul 1997 05:00:00 GMT\r\n");425 sprintf(buf , "Last-Modified: %s\r\n", timebuf);426 sprintf(buf , "Connection: close\r\n");427 sprintf(buf , "\r\n");423 sprintf(buf+strlen(buf), "Cache-Control: no-store, no-cache, must-revalidate\r\n"); 424 sprintf(buf+strlen(buf), "Expires: Sat, 26 Jul 1997 05:00:00 GMT\r\n"); 425 sprintf(buf+strlen(buf), "Last-Modified: %s\r\n", timebuf); 426 sprintf(buf+strlen(buf), "Connection: close\r\n"); 427 sprintf(buf+strlen(buf), "\r\n"); 428 428 webif_write(buf, f); 429 429 } … … 461 461 send_headers(f, status, title, extra, "text/html"); 462 462 sprintf(buf, "<HTML><HEAD><TITLE>%d %s</TITLE></HEAD>\r\n", status, title); 463 sprintf(buf , "<BODY><H4>%d %s</H4>\r\n", status, title);464 sprintf(buf , "%s\r\n", text);465 sprintf(buf , "</BODY></HTML>\r\n");463 sprintf(buf+strlen(buf), "<BODY><H4>%d %s</H4>\r\n", status, title); 464 sprintf(buf+strlen(buf), "%s\r\n", text); 465 sprintf(buf+strlen(buf), "</BODY></HTML>\r\n"); 466 466 webif_write(buf, f); 467 467 } -
trunk/oscam-http.c
r3931 r3937 2840 2840 if (SSL_accept(ssl) != -1) 2841 2841 process_request((FILE *)ssl, remote.sin_addr); 2842 else 2843 ERR_print_errors_fp(stderr); 2842 else { 2843 cfg->http_use_ssl=0; 2844 FILE *f; 2845 f = fdopen(s, "r+"); 2846 send_error(f, 200, "Bad Request", NULL, "This web server is running in SSL mode."); 2847 fclose(f); 2848 cfg->http_use_ssl=1; 2849 } 2844 2850 SSL_shutdown(ssl); 2845 2851 close(s);
Note:
See TracChangeset
for help on using the changeset viewer.