Changeset 4028


Ignore:
Timestamp:
12/01/10 22:29:09 (10 years ago)
Author:
alno
Message:

WebIf: correct mime types

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/oscam-http-helpers.c

    r4027 r4028  
    433433        FILE *fp;
    434434        char buffer[1024];
    435         memset(buffer, 0, 1024);
    436435
    437436        if((fp = fopen(cfg->http_css,"r"))==NULL) return;
    438         while(fgets(buffer, 1024, fp) != 0) {
    439             webif_write(buffer, f);
    440             memset(buffer, 0, 1024);
    441         }
     437        while(fgets(buffer, 1024, fp) != 0) webif_write(buffer, f);
     438
    442439        fclose (fp);
    443440    } else {
     
    450447        FILE *fp;
    451448        char buffer[1024];
    452         memset(buffer, 0, 1024);
    453449
    454450        if((fp = fopen(cfg->http_jscript,"r"))==NULL) return;
    455         while(fgets(buffer, 1024, fp) != 0) {
    456             webif_write(buffer, f);
    457             memset(buffer, 0, 1024);
    458         }
     451        while(fgets(buffer, 1024, fp) != 0) webif_write(buffer, f);
     452
    459453        fclose (fp);
    460454    } else {
  • trunk/oscam-http.c

    r4004 r4028  
    26632663
    26642664    /*build page*/
    2665     send_headers(f, 200, "OK", NULL, "text/html");
    2666     if(pgidx == 8) send_css(f);
    2667     else if (pgidx == 17) send_js(f);
    2668     else {
     2665    if(pgidx == 8) {
     2666        send_headers(f, 200, "OK", NULL, "text/css");
     2667        send_css(f);
     2668    } else if (pgidx == 17) {
     2669        send_headers(f, 200, "OK", NULL, "text/javascript");
     2670        send_js(f);
     2671    } else {
     2672        send_headers(f, 200, "OK", NULL, "text/html");
    26692673        time_t t;
    26702674        struct templatevars *vars = tpl_create();
Note: See TracChangeset for help on using the changeset viewer.