]> git.ipfire.org Git - thirdparty/squid.git/commit - src/http.cc
HTTP Compliance: delete Warnings that have warning-date different from Date.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 10 Sep 2010 21:12:54 +0000 (15:12 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 10 Sep 2010 21:12:54 +0000 (15:12 -0600)
commitc679653dc8705ef70346691f62499981ef8c3f09
treee6560d807c7949099c3a7cdb902405dc41fcf3f3
parent655daa0610ed6c5ee86a5978c9a7c23a4adf0034
HTTP Compliance: delete Warnings that have warning-date different from Date.

Added HttpReply::removeStaleWarnings() method that iterates over all Warning
headers and removes stale warning-values. If a reply has no valid Date header,
all warning-values with warning-date are removed. Also, we remove
warning-value if we failed to parse warning-date.

removeStaleWarnings() is called from processReplyHeader(), after reply headers
are parsed.

Co-Advisor test cases:
  test_case/rfc2616/date-accept-fmt-warn-asctime-rfc1123
  test_case/rfc2616/date-accept-fmt-warn-asctime-rfc850
  test_case/rfc2616/date-accept-fmt-warn-rfc1123-asctime
  test_case/rfc2616/date-accept-fmt-warn-rfc1123-rfc850
  test_case/rfc2616/date-accept-fmt-warn-rfc850-asctime
  test_case/rfc2616/date-accept-fmt-warn-rfc850-rfc1123
src/HttpHeader.cc
src/HttpReply.cc
src/HttpReply.h
src/http.cc