Earlier quoted context omitted.
although that server is very horrible
What's wrong with it? Honestly, I don't know. I know Python probably isn't a great choice for performance reasons, but anything else? It's super easy to build off and configure. Seems fine for a beginner (which I admittedly am; hence my asking).
Nweb: a tiny, safe web server (static pages only)
41–50 of 63 posts
Re: Nweb: a tiny, safe web server (static pages only)
#42Not a prank!
Re: Nweb: a tiny, safe web server (static pages only)
#43Adding to what everyone else has said, this also "how not" to write socket code; for instance, the assumption that you can read a whole HTTP request "in one go" with a single large read call is false. Also, casting function calls to (void) is nonsensical. You can perhaps forgive the sprintf() call because, AIX. (Believe it or not, there was a time when snprintf was a portability problem). You can't forgive the log()…
This also has the side effect of this implementation not supporting IPv6, among others.
So please, don't use this as anything other than an example how not to do sockets.
If you want to learn how to do it right, I can recommend the excellent "Guide to Network Programming Using Internet Sockets" by Brian "Beej Jorgensen" Hall (You should definitely buy the printed version, just to support him :)).
Re: Nweb: a tiny, safe web server (static pages only)
#44can someone explain that please?
Re: Nweb: a tiny, safe web server (static pages only)
#45I am always on the look out for a small, lightweight and secure web server for impromptu file sharing. Right now I use publicfile from djb.[^1] My only complaint is that there is no debian package for publicfile so I have to build my own package. I would love to find an equivalent (ftp not necessary) daemon that is included in debian. Is anyone aware of a something in debian repos that I am overlooking? [^1]: http://…
Re: Nweb: a tiny, safe web server (static pages only)
#46I am always on the look out for a small, lightweight and secure web server for impromptu file sharing. Right now I use publicfile from djb.[^1] My only complaint is that there is no debian package for publicfile so I have to build my own package. I would love to find an equivalent (ftp not necessary) daemon that is included in debian. Is anyone aware of a something in debian repos that I am overlooking? [^1]: http://…
Re: Nweb: a tiny, safe web server (static pages only)
#47I am always on the look out for a small, lightweight and secure web server for impromptu file sharing. Right now I use publicfile from djb.[^1] My only complaint is that there is no debian package for publicfile so I have to build my own package. I would love to find an equivalent (ftp not necessary) daemon that is included in debian. Is anyone aware of a something in debian repos that I am overlooking? [^1]: http://…
Re: Nweb: a tiny, safe web server (static pages only)
#48Earlier quoted context omitted.
What's wrong with it? Honestly, I don't know. I know Python probably isn't a great choice for performance reasons, but anything else? It's super easy to build off and configure. Seems fine for a beginner (which I admittedly am; hence my asking).
Main issue is it's single threaded. So if you use it to share big files with an other machines, only 1 file can be downloaded at a time and a download will block browsing of available files.
Re: Nweb: a tiny, safe web server (static pages only)
#49I want to learn a bit about web servers and I think that study the source code of a functional one may worth more than try to build something from scratch at first glance. Since I'm seeing too many comments on the security issues of this particular project, can you guys recommend something more reliable? Thanks in advance. Edit: I "know" C and C++ and would like to remain in one of these languages, if it's not asking…
It is not a HTTP server, but a library to create your own ones. With many examples, as a trivial only share files at https://github.com/davidmoreno/onion/blob/master/examples/ba...
Re: Nweb: a tiny, safe web server (static pages only)
#50Does this do SSL ? If not, there is no reason to use this instead of the (excellent) thttpd. thttpd is a very, very nice tool. It's very handy sometimes to just fire up thttpd -d /some/dir because you want to look at the contents of the dir in a web browser but don't want to spin up the whole environment and server, etc. I put thttpd on a lot of informal servers just to have it around when I need something like that.…