On Sun, 3 Aug 2025, ci4ic4 wrote:
#!/usr/pkg/bin/zsh
nohup simple-http-server --ip 192.168.0.49 -p 3003 --index /bd/sysbuild/release
&
nohup simple-http-server --ip 192.168.0.49 -p 3004 --index /bd/pkgsrc/packages
&
I clean-install from the DVD image and configure the network settings of the
guest, as usual; the network works as expected. The access is via http, the
base directory is empty, the packages directory is All and everything used to
work. However, the initial pkgin package does not get installed - pkg_add does
not appear to find the package by name, the command
pkg_add http://192.168.0.49/All/pkgin
fails with 'no pkg for ' ...
If `simple-http-server' is this[1] one, then I can tell you what the issue is:
1. simple-http-server returns an `index.html' with `href' links like this:
```
<td><a href="/pkgin-25.5.1.tgz">pkgin-25.5.1.tgz</a></td>
```
whereas (bozo)httpd returns:
```
<tr><td><a href="pkgin-25.5.1.tgz">pkgin-25.5.1.tgz</a><td>04-Aug-2025 04:02<td
align=right>70kB
```
ie. there's a extra `/' at the beginning of the link in simple-http-server's
case.
2. This isn't handled by pkg_add(8) and friends.
Use bozohttpd instead, and you won't have any issues, I think:
```
$ /usr/libexec/httpd -f -n -s -I 8080 -X /tmp
```
File a PR for pkg_add/pkg_install too. It should handle a leading `/' too, I
think (not sure--may have to read the RFCs some time...).
-RVP
[1]: https://github.com/TheWaWaR/simple-http-server