> Yes, the only output I get back from that is 0\r\n and the TCP connection
> remains open.

I have reproduced the bug in QEMU as follows:

1. Make a qcow2 disk:
> qemu-img create -f qcow2 disk.qcow2 32G

2. Start an amd64 qemu vm with a nic, the disk attached, and the 7.7
install media in the cdrom drive:
> qemu-system-x86_64 -m 2048 -drive if=virtio,file=disk.qcow2,format=qcow2 -nic 
> user,model=virtio-net-pci -cdrom install77.iso

3. Use the following install.conf for autoinstall in the vm:
> System hostname = server1
> Password for root = <fill me in>
> Change the default console to com0 = no
> What timezone are you in = US/Eastern
> Location of sets = http
> HTTP Server = cdn.openbsd.org

4. Run the attached script.

5. Observe the following output:
> 00000000  30 0d 0a 0d 0a 48 54 54  50 2f 31 2e 31 20 32 30  |0....HTTP/1.1 20|
> 00000010  30 20 4f 4b 0d 0a 43 6f  6e 6e 65 63 74 69 6f 6e  |0 OK..Connection|
> 00000020  3a 20 6b 65 65 70 2d 61  6c 69 76 65 0d 0a 43 6f  |: keep-alive..Co|
> 00000030  6e 74 65 6e 74 2d 74 79  70 65 3a 20 74 65 78 74  |ntent-type: text|
> 00000040  2f 68 74 6d 6c 3b 20 63  68 61 72 73 65 74 3d 55  |/html; charset=U|
> 00000050  54 46 2d 38 0d 0a 44 61  74 65 3a 20 54 75 65 2c  |TF-8..Date: Tue,|
> 00000060  20 31 36 20 53 65 70 20  32 30 32 35 20 32 33 3a  | 16 Sep 2025 23:|
> 00000070  33 39 3a 30 34 20 47 4d  54 0d 0a 53 65 72 76 65  |39:04 GMT..Serve|
> 00000080  72 3a 20 4f 70 65 6e 42  53 44 20 68 74 74 70 64  |r: OpenBSD httpd|
> 00000090  0d 0a 54 72 61 6e 73 66  65 72 2d 45 6e 63 6f 64  |..Transfer-Encod|
> 000000a0  69 6e 67 3a 20 63 68 75  6e 6b 65 64 0d 0a 0d 0a  |ing: chunked....|
> 000000b0  62 0d 0a 68 65 6c 6c 6f  20 77 6f 72 6c 64 0d 0a  |b..hello world..|
> 000000c0  30 0d 0a 0d 0a                                    |0....|
> 000000c5

I was able to get the behavior you described by removing the `sleep`
in the attached script. Maybe you're getting this effect due to nc
shutting down the tcp connection before httpd is done talking?

-Ben

Attachment: post-install.sh
Description: application/shellscript

Reply via email to