nonhttpd

A httpd serving nothing.
git clone git://r-36.net/nonhttpd
Log | Files | Refs | README | LICENSE

commit 6a1426cf010637ea9ff239d3c824b06148918fd3
parent e2c8a6e539f2a94884401ab5d0191d236ffc72ca
Author: Christoph Lohmann <20h@r-36.net>
Date:   Tue, 11 Aug 2026 12:37:02 +0200

Serve nothing. Thanks joostvb!

Diffstat:
MREADME.md | 7+++++--
Mnonhttpd | 4++--
Mnonhttpd.1 | 2++
Dsocat-nonhttpd.sh | 4----
4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md @@ -3,7 +3,10 @@ This httpd will serve nothing. You will need some way to handle TCP re‐ quests, like socat(1), inetd(8) or xinetd(8). -## Using with socat +## Using socat -see socat-nohttpd.sh +See the examples/ directory. + + +Have fun! diff --git a/nonhttpd b/nonhttpd @@ -3,7 +3,7 @@ printf "HTTP/1.1 OK\r Content-Type: text/html;\r Last-Modified: Fr, 07 Mar 1492 02:04:03 GMT\r -Content-Length: 15\r +Content-Length: 0\r \r -<html> </html>\r\n" +\r\n" diff --git a/nonhttpd.1 b/nonhttpd.1 @@ -9,6 +9,8 @@ is a simple httpd server that should be used in conjunction with situations in browsers where requests need to be redirected to something fast. .SH EXAMPLES $ socat tcp-l:8080,reuseaddr,fork,su=nobody exec=/usr/bin/nonhttpd +.br +(See the examples in the distribution.) .SH AUTHORS See the LICENSE file for the authors. .SH LICENSE diff --git a/socat-nonhttpd.sh b/socat-nonhttpd.sh @@ -1,4 +0,0 @@ -#!/bin/sh - -socat tcp-l:8080,reuseaddr,fork exec:/usr/bin/nonhttpd -