Roxen.git / server / protocols / http.pike

version» Context lines:

Roxen.git/server/protocols/http.pike:3028: Inside #if defined(HTTP_COMPRESSION)
   }    }       if(file->compressed && misc->etag) {    string etag = misc->etag;    if(etag[sizeof(etag)-1..] == "\"")    misc->etag = etag[..sizeof(etag)-2] + ";gzip\"";    }   #endif    -  if ((method != "HEAD") && (undefinedp(file->len) || (file->len < 0))) { +  if ((method != "HEAD") && (undefinedp(file->len) || (file->len < 0)) && +  (misc->connection == "keep-alive")) {    // Unknown length ==> Connection: close.    variant_heads->Connection = "close";    misc->connection = "close";    }       if (file->error == 200) {    int conditional;    if (none_match) {    // NOTE: misc->etag may be zero below, but that's ok.    if (none_match[misc->etag] || (misc->etag && none_match["*"])) {
Roxen.git/server/protocols/http.pike:3120:    file->data = "";    file->file = 0;    } else {   #ifdef HTTP_COMPRESSION    if(misc->etag)    variant_heads["ETag"] = misc->etag;    if(file->encoding)    variant_heads["Content-Encoding"] = file->encoding;    // Perhaps set some gzip log status if file->encoding == "gzip" here?   #endif -  if ((method != "HEAD") && (undefinedp(file->len) || (file->len < 0))) { +  if ((method != "HEAD") && (undefinedp(file->len) || (file->len < 0)) && +  (misc->connection == "keep-alive")) {    // Unknown length ==> Connection: close.    variant_heads->Connection = "close";    misc->connection = "close";    }    if (misc->range) {    // Handle byte ranges.    int skip;    string if_range;    if (if_range = request_headers["if-range"]) {    // Check If-Range header (RFC 2068 14.27).