revert back to pure text
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
Signed-off-by: Jochen Maes <jochen@sejo-it.be>
This commit is contained in:
parent
09b1b01fc8
commit
da471f3e02
@ -15,7 +15,7 @@ fn throw_ip_back(mut stream: TcpStream) {
|
||||
let status_line = "HTTP/1.1 200 OK";
|
||||
let raw_addr = stream.peer_addr().unwrap().ip().to_string();
|
||||
println!("{}", raw_addr);
|
||||
let content = format!("HTTP/1.1 200 OK <DOCTYPE html><HTML><BODY>{}</BODY></HTML>",raw_addr.replace("::ffff:", ""));
|
||||
let content = format!("{}",raw_addr.replace("::ffff:", ""));
|
||||
let length = content.len();
|
||||
let response = format!("{status_line}\r\nContent-Length: {length}\r\nContent-Type: text/html; charset=utf-8\r\n\r\n{content}");
|
||||
stream.write_all(response.as_bytes()).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user