Live data from Hacker News

Nweb: a tiny, safe web server (static pages only)

ibm.com

61–63 of 63 posts

Re: Nweb: a tiny, safe web server (static pages only)

#61

For those of you who are interested in a tiny, safe, static file server that provides secure, public URLs from any machine (ngrok-style), I have a simple project called srvdir that will probably be useful to you: https://srvdir.net

Nice, but the writing suggests that it's secure as in end-to-end encryption, what people expect from HTTPS, while in fact you tunnel everything in plain through a central server. You should make this clear on the site.

Re: Nweb: a tiny, safe web server (static pages only)

#62
post #51
post #44

> if LINUX sleep for one second to ensure the data arrives at the browser can someone explain that please?

It's explained further down: After the last byte of the file is sent, the nweb web server web() function stops for one second. This is to enable the file contents to be sent down the socket. If it immediately closes the socket, some operating systems do not wait for the socket to finish sending the data but drops the connection very abruptly. This would mean that some of the file content would not get to the browser,…

This text has an error rate of about one factual error per sentence, as you'd expect from someone who capitalizes "Linux" as if it were an acronym.

Re: Nweb: a tiny, safe web server (static pages only)

#63
post #62
post #51

Earlier quoted context omitted.

It's explained further down: After the last byte of the file is sent, the nweb web server web() function stops for one second. This is to enable the file contents to be sent down the socket. If it immediately closes the socket, some operating systems do not wait for the socket to finish sending the data but drops the connection very abruptly. This would mean that some of the file content would not get to the browser,…

This text has an error rate of about one factual error per sentence, as you'd expect from someone who capitalizes "Linux" as if it were an acronym.

We're definitely in "works on my machine" territory here.

Still it's good for building your confidence as a programmer, no?

Post reply on HN