[Pkg-ocaml-maint-commits] [approx] 09/16: remove code for denying some index files
Eric Cooper
ecc at cmu.edu
Mon Dec 9 15:44:03 UTC 2013
This is an automated email from the git hooks/post-receive script.
ecc-guest pushed a commit to branch upstream
in repository approx.
commit 9895b0c8a8fc2b0713fca4f06c43ae038e08fdf5
Author: Eric Cooper <ecc at cmu.edu>
Date: Tue Apr 23 17:45:50 2013 -0400
remove code for denying some index files
disadvantage: multiple versions of index may be kept in cache
advantage: works with repos or tools that only handle some compressed formats
---
approx.ml | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/approx.ml b/approx.ml
index e5f5b1b..d1f31b8 100644
--- a/approx.ml
+++ b/approx.ml
@@ -492,23 +492,6 @@ let cache_miss url name ims mod_time =
debug_message " => cache miss";
`Accept_body (remote_service url name ims mod_time)
-(* See if the given file should be denied (reported to the client as
- not found) rather than fetched remotely. This is done in two cases:
- * the client is requesting a non-bz2 version of an index
- * the client is requesting a DiffIndex and an up-to-date .bz2 version
- of the corresponding index exists in the cache
- By denying the request, the client will fall back to requesting
- the Packages.bz2 or Sources.bz2 file. *)
-
-let should_deny name =
- (Release.is_index name && extension name <> ".bz2") ||
- (pdiffs && Release.is_diff_index name &&
- Release.valid (Pdiff.index_file name))
-
-let deny name =
- debug_message "Denying %s" name;
- `Std_response (`Not_found, None, None)
-
let ims_time env =
try Netdate.parse_epoch (env#input_header#field "If-Modified-Since")
with Not_found | Invalid_argument _ -> 0.
@@ -530,7 +513,6 @@ let serve_file env =
try
let url, name = Url.translate_request path in
if should_pass_through name then cache_miss url name 0. 0.
- else if should_deny name then deny name
else
let ims = ims_time env in
match serve_local name ims env with
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/approx.git
More information about the Pkg-ocaml-maint-commits
mailing list