New Upstream Snapshot - websocketd

Ready changes

Summary

Merged new upstream version: 0.4.1+git20221104.1.334a9ec (was: 0.4.1).

Resulting package

Built on 2022-11-19T16:53 (took 19m6s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots websocketd

Lintian Result

Diff

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 4628199..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-websocketd
-go-*
diff --git a/debian/changelog b/debian/changelog
index 5f2cadd..a1a14c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
-websocketd (0.4.1-2) UNRELEASED; urgency=medium
+websocketd (0.4.1+git20221104.1.334a9ec-1) UNRELEASED; urgency=medium
 
   * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
     Repository-Browse.
   * Update standards version to 4.6.1, no changes needed.
+  * New upstream snapshot.
 
- -- Debian Janitor <janitor@jelmer.uk>  Sat, 10 Sep 2022 08:13:27 -0000
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 19 Nov 2022 16:43:28 -0000
 
 websocketd (0.4.1-1) unstable; urgency=medium
 
diff --git a/examples/qjs/request-reply.js b/examples/qjs/request-reply.js
new file mode 100755
index 0000000..b8a48b6
--- /dev/null
+++ b/examples/qjs/request-reply.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env -S qjs --module
+import * as std from "std";
+
+let line;
+while ((line = std.in.getline()) != null) {
+  console.log("RCVD: " + line)
+  std.out.flush();
+}
diff --git a/go.mod b/go.mod
index 607bcda..e40afd2 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,5 @@
 module github.com/joewalnes/websocketd
 
+go 1.15
+
 require github.com/gorilla/websocket v1.4.0
diff --git a/libwebsocketd/console.go b/libwebsocketd/console.go
index 759582d..8aa5f17 100644
--- a/libwebsocketd/console.go
+++ b/libwebsocketd/console.go
@@ -25,6 +25,7 @@ Full documentation at http://websocketd.com/
 
 <!DOCTYPE html>
 <meta charset="utf8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
 <title>websocketd console</title>
 
 <style>
diff --git a/main.go b/main.go
index ec09496..636bec0 100644
--- a/main.go
+++ b/main.go
@@ -94,13 +94,16 @@ func main() {
 				pos := strings.IndexByte(addr, ':')
 				rediraddr := addr[:pos] + ":" + strconv.Itoa(config.RedirPort) // it would be silly to optimize this one
 				redir := &http.Server{Addr: rediraddr, Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-
 					// redirect to same hostname as in request but different port and probably schema
 					uri := "https://"
 					if !config.Ssl {
 						uri = "http://"
 					}
-					uri += r.Host[:strings.IndexByte(r.Host, ':')] + addr[pos:] + "/"
+					if cpos := strings.IndexByte(r.Host, ':'); cpos > 0 {
+						uri += r.Host[:strings.IndexByte(r.Host, ':')] + addr[pos:] + "/"
+					} else {
+						uri += r.Host + addr[pos:] + "/"
+					}
 
 					http.Redirect(w, r, uri, http.StatusMovedPermanently)
 				})}
diff --git a/release/Makefile b/release/Makefile
index de6cba3..eb6feee 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -61,6 +61,9 @@ FLAGS_openbsd_386   = GOOS=openbsd GOARCH=386   CGO_ENABLED=0
 FLAGS_openbsd_amd64 = GOOS=openbsd GOARCH=amd64 CGO_ENABLED=0
 FLAGS_solaris_amd64 = GOOS=solaris GOARCH=amd64 CGO_ENABLED=0
 
+EXTENSION_windows_386 = .exe
+EXTENSION_windows_amd64 = .exe
+
 all: build
 
 localgo: $(GO_DIR)/bin/go
@@ -85,7 +88,11 @@ out/$(RELEASE_VERSION)/%/websocketd.exe: ../*.go ../libwebsocketd/*.go $(GO_DIR)
 
 out/$(RELEASE_VERSION)/websocketd-$(RELEASE_VERSION)-%.zip: out/$(RELEASE_VERSION)/%/websocketd
 	rm -f $@
-	zip -j $@ out/$(RELEASE_VERSION)/$*/* ../{README.md,LICENSE,CHANGES}
+	zip -j $@ $< ../{README.md,LICENSE,CHANGES}
+
+out/$(RELEASE_VERSION)/websocketd-$(RELEASE_VERSION)-windows_%.zip: out/$(RELEASE_VERSION)/windows_%/websocketd.exe
+	rm -f $@
+	zip -j $@ $< ../{README.md,LICENSE,CHANGES}
 
 
 BINARIES = $(foreach PLATFORM,$(PLATFORMS),out/$(RELEASE_VERSION)/$(PLATFORM)/websocketd$(EXTENSION_$(PLATFORM)))
@@ -97,7 +104,7 @@ binaries: $(BINARIES)
 
 build: out/$(RELEASE_VERSION)/CHECKSUMS
 
-out/$(RELEASE_VERSION)/CHECKSUMS: $(BINARIES) $(ZIPS)  $(DEBS) $(RPMS)
+out/$(RELEASE_VERSION)/CHECKSUMS: $(BINARIES) $(ZIPS) $(DEBS) $(RPMS)
 	sha256sum $^ | sed -e 's/out\/$(RELEASE_VERSION)\///' >$@
 
 
@@ -117,7 +124,7 @@ out/$(RELEASE_VERSION)/websocketd-$(RELEASE_VERSION)_i386.deb: $(GO_UNPACKED) ou
 	cp out/$(RELEASE_VERSION)/linux_386/websocketd out/$(RELEASE_VERSION)/deb32/usr/bin/
 	cp ../{LICENSE,AUTHORS,CHANGES,README.md} out/$(RELEASE_VERSION)/deb32/usr/share/doc/websocketd-$(RELEASE_VERSION)
 	cat websocketd.man | gzip > out/$(RELEASE_VERSION)/deb32/usr/share/man/man1/websocket.1.gz
-	fpm -f -s dir -t deb -a i386 -n websocketd -v $(RELEASE_VERSION) -C out/$(RELEASE_VERSION)/deb32/ -p out/$(RELEASE_VERSION)/websocketd-VERSION_ARCH.deb $(BASEFPM) $(DEB_FPM) usr/
+	fpm -f -s dir -t deb -a i386 -n websocketd -v $(RELEASE_VERSION) -C out/$(RELEASE_VERSION)/deb32/ -p out/$(RELEASE_VERSION)/websocketd-VERSION_ARCH.deb --deb-no-default-config-files $(BASEFPM) $(DEB_FPM) usr/
 	rm -rf out/$(RELEASE_VERSION)/deb32/
 
 out/$(RELEASE_VERSION)/websocketd-$(RELEASE_VERSION)_amd64.deb:  $(GO_UNPACKED) out/$(RELEASE_VERSION)/linux_amd64/websocketd
@@ -125,7 +132,7 @@ out/$(RELEASE_VERSION)/websocketd-$(RELEASE_VERSION)_amd64.deb:  $(GO_UNPACKED)
 	cp out/$(RELEASE_VERSION)/linux_amd64/websocketd out/$(RELEASE_VERSION)/deb64/usr/bin/
 	cp ../{LICENSE,AUTHORS,CHANGES,README.md} out/$(RELEASE_VERSION)/deb64/usr/share/doc/websocketd-$(RELEASE_VERSION)
 	cat websocketd.man | gzip > out/$(RELEASE_VERSION)/deb64/usr/share/man/man1/websocket.1.gz
-	fpm -f -s dir -t deb -a amd64 -n websocketd -v $(RELEASE_VERSION) -C out/$(RELEASE_VERSION)/deb64/ -p out/$(RELEASE_VERSION)/websocketd-VERSION_ARCH.deb $(BASEFPM) $(DEB_FPM) usr/
+	fpm -f -s dir -t deb -a amd64 -n websocketd -v $(RELEASE_VERSION) -C out/$(RELEASE_VERSION)/deb64/ -p out/$(RELEASE_VERSION)/websocketd-VERSION_ARCH.deb --deb-no-default-config-files $(BASEFPM) $(DEB_FPM) usr/
 	rm -rf out/$(RELEASE_VERSION)/deb64/
 
 out/$(RELEASE_VERSION)/websocketd.$(RELEASE_VERSION).x86_64.rpm: $(GO_UNPACKED) out/$(RELEASE_VERSION)/linux_amd64/websocketd

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/doc/websocketd/examples/qjs/request-reply.js

Control files: lines which differ (wdiff format)

  • Built-Using: golang-github-gorilla-websocket (= 1.5.0-1~jan+lint3) 1.5.0-2)

More details

Full run details