This patch implements a --mirror command-line option causing the replicator to behave as a transparent proxy rather than a traditional http proxy: requests for a file at a given URI are satisfied by fetching the file from the URI with the mirror URL prepended.
This is useful for implementing a site-local transparent mirror of a yum/apt repository, for example. The administrator can pre-populate the root directory from a distribution CD and let http-replicator handle requests for new files from an upstream mirror. Clients use the local mirror like any other, and users needn't be aware of the upstream server or configure a proxy.
A second option, --nohost, causes http-replicator not to use the hostname and port as the top level of the directory hierarchy, as this is unnecessary when http-replicator is mirroring a single site.
Patch for --mirror and --nohost options