Ignore:
Timestamp:
05/15/11 22:56:25 (9 years ago)
Author:
Admin
Message:

WebIf: Improve bugfix for size 0 pages...

File:
1 edited

Legend:

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

    r5238 r5239  
    581581        size = strlen(result);
    582582    }
     583    // We need at least size 1 or keepalive gets problems on some browsers...
     584    if(size < 1){
     585        if(allocated){
     586            free(result);
     587            allocated = 0;
     588        }
     589        result = " ";
     590        size = 1;
     591    }
    583592    if((etagheader == 0 && moddate < modifiedheader) || (etagheader > 0 && (uint32_t)crc32(0L, (uchar *)result, size) == etagheader)){
    584593        send_header304(f);
    585594    } else {
    586         // We need at least size 1 or keepalive gets problems on some browsers...
    587         if(size < 1){
    588             send_headers(f, 200, "OK", NULL, mimetype, 1, 1, result, 0);
    589             webif_write(" ", f);
    590         } else {
    591             send_headers(f, 200, "OK", NULL, mimetype, 1, size, result, 0);
    592             webif_write(result, f);
    593         }
     595        send_headers(f, 200, "OK", NULL, mimetype, 1, size, result, 0);
     596        webif_write(result, f);
    594597    }
    595598    if(allocated) free(result);
Note: See TracChangeset for help on using the changeset viewer.