Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1231879

Bug#1095230: apt-cacher-ng sends RFC non-compliant timestamps to clients

From John Hallam <sw@j.hallam.dk>
Newsgroups linux.debian.bugs.dist
Subject Bug#1095230: apt-cacher-ng sends RFC non-compliant timestamps to clients
Date 2025-02-05 16:50 +0100
Message-ID <KcPP3-eCGp-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Package: apt-cacher-ng
Version: 3.6.4

  When sending files to clients, apt-cacher-ng generates obsolete timestamps for 
the HTTP interaction, since it uses asctime() to produce them.  This causes
interoperability problems.  The relevant spec at

	https://datatracker.ietf.org/doc/html/rfc2616#section-3.3.1

says:

        HTTP/1.1 clients and servers that parse the date value MUST
        accept all three formats (for compatibility with HTTP/1.0),
        though they MUST only generate the RFC 1123 format for
        representing HTTP-date values in header fields.

  To fix this:

  - change FormatTime(...) in meta.cc to generate a standards-compliant timestamp
    RFC 1123 format

  - change the definition of tLocalGetFitem(...) in job.cc so that the magic
    number 26 becomes 28  (or, better, arrange for the magic number, which is
    the length of the timestamp, to be computed rather than assumed)

  No doubt the same issue affects earlier versions of the apt-cacher-ng package.

  I noticed this issue while running Devuan Chimaera with C library (libc-bin)
2.31-13+deb11u11 -- though that's irrelevant since the package is non-conformant
to RFC whatever it is run on.

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1095230: apt-cacher-ng sends RFC non-compliant timestamps to clients John Hallam <sw@j.hallam.dk> - 2025-02-05 16:50 +0100

csiph-web