/* rv->cache_control */
/* rv->content_range */
/* rv->keep_alive */
- HttpVersion ver(1,0);
+ HttpVersion ver(1,1);
httpStatusLineSet(&rv->sline, ver, HTTP_NOT_MODIFIED, "");
for (t = 0; ImsEntries[t] != HDR_OTHER; ++t)
/* Not as efficient as skipping the header duplication,
* but easier to maintain
*/
- HttpReply *temp = make304 ();
+ HttpReply *temp = make304();
MemBuf *rv = temp->pack();
delete temp;
return rv;
const char *ctype, int64_t clen, time_t lmt, time_t expiresTime)
{
HttpHeader *hdr;
- HttpVersion ver(1,0);
+ HttpVersion ver(1,1);
httpStatusLineSet(&sline, ver, status, reason);
hdr = &header;
hdr->putStr(HDR_SERVER, visible_appname_string);
HttpReply::redirect(http_status status, const char *loc)
{
HttpHeader *hdr;
- HttpVersion ver(1,0);
+ HttpVersion ver(1,1);
httpStatusLineSet(&sline, ver, status, httpStatusString(status));
hdr = &header;
hdr->putStr(HDR_SERVER, APP_FULLNAME);
debugs(33, 3, "clientSetKeepaliveFlag: method = " <<
RequestMethodStr(request->method));
- /* We are HTTP/1.0 facing clients still */
- HttpVersion http_ver(1,0);
+ /* We are HTTP/1.1 facing clients now*/
+ HttpVersion http_ver(1,1);
if (httpMsgIsPersistent(http_ver, req_hdr))
request->flags.proxy_keepalive = 1;
reply = HTTPMSGLOCK(rep);
if (reply->sline.protocol == PROTO_HTTP) {
- /* enforce 1.0 reply version (but only on real HTTP traffic) */
- reply->sline.version = HttpVersion(1,0);
+ /* RFC 2616 requires us to advertise our 1.1 version (but only on real HTTP traffic) */
+ reply->sline.version = HttpVersion(1,1);
}
/* do header conversions */
if (!parsed && error > 0) { // unrecoverable parsing error
debugs(11, 3, "processReplyHeader: Non-HTTP-compliant header: '" << readBuf->content() << "'");
flags.headers_parsed = 1;
- newrep->sline.version = HttpVersion(1,0);
+ newrep->sline.version = HttpVersion(1,1);
newrep->sline.status = error;
HttpReply *vrep = setVirginReply(newrep);
entry->replaceHttpReply(vrep);
/* Skip 1xx messages for now. Advertised in Via as an internal 1.0 hop */
if (newrep->sline.protocol == PROTO_HTTP && newrep->sline.status >= 100 && newrep->sline.status < 200) {
-#if WHEN_HTTP11
+#if WHEN_HTTP11_EXPECT_HANDLED
/* When HTTP/1.1 check if the client is expecting a 1xx reply and maybe pass it on */
if (orig_request->header.has(HDR_EXPECT)) {
// TODO: pass to the client anyway?