Roxen.git / server / protocols / http.pike

version» Context lines:

Roxen.git/server/protocols/http.pike:2025: Inside #if defined(RAM_CACHE)
   "raw":file->raw,    "len":strlen(data),    "error":file->error,    ]);    cache_status["protstore"] = 1;    }    }    }   #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:2108:    // Any response message which MUST NOT include a message-body    // (such as the 1xx, 204, and 304 responses and any response    // to a HEAD request) is always terminated by the first empty    // line after the header fields, regardless of the entity-header    // fields present in the message.       file->len = 1; // Keep those alive, please...    file->data = "";    file->file = 0;    } else { -  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).