HTTP/1.1 directory listing and file server using TCP sockets for fun
A non-blocking directory listing and file server. It implementats HTTP/1.1 keepalive, chunked transfer, and byte range.
The HTTP server implementation provides a channel for writing chunked response. It could be used as a library. Read the API.
Usage: gofile port [dir]
Examples:
gofile 8080
gofile 8080 ~/public
go get -u github.com/siadat/gofile
Host
headerConnection: close
should be closedSubmit an issue or send a pull request.
Make sure you ./run-tests.bash
to test your patch.
Thanks @valyala for his feature suggestions. Thanks @maruel for reviewing the http package.