Skip to content

Commit

Permalink
adjust to 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Oct 5, 2024
1 parent 4f481e2 commit 599d332
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 47 deletions.
42 changes: 7 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ edition = "2021"
license = "BSD-3-Clause"

[build-dependencies]
varnish = "0.0.19"
#varnish = "0.0.19"
varnish = { path = "../varnish-rs/varnish" }

[dependencies]
varnish = "0.0.19"
varnish = { path = "../varnish-rs/varnish" }
varnish-sys = { path = "../varnish-rs/varnish-sys" }
chrono = "0.4.23"

[lib]
Expand Down
15 changes: 5 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ use std::os::unix::fs::MetadataExt;
use chrono::DateTime;
use chrono::offset::Utc;

use varnish::vcl::ctx::Ctx;
use varnish::vcl::backend::{Backend, Serve, Transfer, VCLBackendPtr};
use varnish::vcl::Ctx;
use varnish::vcl::{Backend, Serve, Transfer, VCLBackendPtr};

varnish::vtc!(test01);
varnish::vtc!(test02);
varnish::vtc!(test03);
varnish::vtc!(test04);
varnish::vtc!(test05);
varnish::vtc!(test06);
varnish::run_vtc_tests!("tests/*.vtc");

// root is the Rust implement of the VCC definition (in vmod.vcc)
// root is the Rust implementation of the VCC definition (in vmod.vcc)
// it only contains backend, which wraps a FileBackend, and
// handles response body creation with a FileTransfer
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -88,7 +83,7 @@ impl Serve<FileTransfer> for FileBackend<> {

// combine root and url into something that's hopefully safe
let path = assemble_file_path(&self.path, bereq_url);
ctx.log(varnish::vcl::ctx::LogTag::Debug, &format!("fileserver: file on disk: {:?}", path));
ctx.log(varnish::vcl::LogTag::Debug, &format!("fileserver: file on disk: {:?}", path));

// reset the bereq lifetime, otherwise we couldn't use ctx in the line above
// yes, it feels weird at first, but it's for our own good
Expand Down

0 comments on commit 599d332

Please sign in to comment.