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

WebIf: Fix caching bug for images and empty oscam.js. Use javascript for auto-refresh of status page as this is much more efficient regarding caching.

File:
1 edited

Legend:

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

    r5229 r5238  
    498498        pos += snprintf(pos, sizeof(buf)-(pos-buf),"Last-Modified: %s\r\n", timebuf);
    499499        if(content){
    500             uint32_t checksum = (uint32_t)crc32(0L, (uchar *)content, strlen(content));
     500            uint32_t checksum = (uint32_t)crc32(0L, (uchar *)content, length);
    501501            pos += snprintf(pos, sizeof(buf)-(pos-buf),"ETag: \"%u\"\r\n", checksum==0?1:checksum);
    502502        }
     
    581581        size = strlen(result);
    582582    }
    583     if((etagheader == 0 && moddate < modifiedheader) || (uint32_t)crc32(0L, (uchar *)result, size) == etagheader){
     583    if((etagheader == 0 && moddate < modifiedheader) || (etagheader > 0 && (uint32_t)crc32(0L, (uchar *)result, size) == etagheader)){
    584584        send_header304(f);
    585585    } else {
Note: See TracChangeset for help on using the changeset viewer.