dot

packages and services management
Log | Files | Refs | README

commit 1eccee19d34418ca4bb1f469be42b26fafe57f81
parent add8eb824d3f9370d8391c018e2ede1f69b3e29f
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 13 Feb 2018 23:40:15 +0100

[del] removed dead code breaking null flag

Diffstat:
Mbin/ghttpd | 15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/bin/ghttpd b/bin/ghttpd @@ -54,7 +54,7 @@ END { print("HTTP/1.1 200 OK\r"); - if (flag == "1") { + if (flag == "1" || flag == "") { print("Content-Type: text/html; charset=UTF-8\r"); print("\r"); print("<!doctype html><title>" HOST "</title><pre>"); @@ -62,15 +62,10 @@ END { t["0"] = "txt"; t["8"] = "net"; t["g"] = "img"; t["1"] = "dir"; t["h"] = "url"; t["I"] = "img"; while (cmd | getline) { - if (flag == "0") { - print(esc($0)); - continue; - } else if (flag == "1") { - sub("\r$", ""); - split($0, f, "\t"); - f[0] = substr(f[1], 1, 1); - sub(".", "", f[1]); - } + sub("\r$", ""); + split($0, f, "\t"); + f[0] = substr(f[1], 1, 1); + sub(".", "", f[1]); if (f[0] == "i") printf(" %s\n", esc(f[1]));