Compare commits

..

2 Commits

Author SHA1 Message Date
8b613a1b6f update
All checks were successful
continuous-integration/drone/push Build is passing
2025-11-26 12:02:30 +01:00
a26ff16bfb Minor fix 2025-11-26 11:58:53 +01:00

View File

@@ -202,13 +202,18 @@ fn process_headers(buff: &[u8]) -> anyhow::Result<Option<ProcessHeadersResult>>
let mut buff = buff.to_vec(); let mut buff = buff.to_vec();
if let Some(prefix) = prefix_path { if let Some(prefix) = prefix_path {
let pos = buff.iter().position(|c| c == &b' '); let pos = buff.iter().position(|c| c == &b' ');
log::debug!("Add path prefix to request {prefix}");
if let Some(pos) = pos { if let Some(pos) = pos {
for (num, c) in prefix.as_bytes().iter().enumerate() { for (num, c) in prefix.as_bytes().iter().enumerate() {
buff.insert(pos + 1 + num, *c); buff.insert(pos + 1 + num, *c);
} }
} else {
log::warn!("Unable to inject prefix!");
} }
} }
log::trace!("Final request: {}", String::from_utf8_lossy(&buff));
Ok(Some(ProcessHeadersResult { Ok(Some(ProcessHeadersResult {
target_host: target_host.to_string(), target_host: target_host.to_string(),
buff, buff,