Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/siadat/gofile
HTTP/1.1 directory listing and file server using TCP sockets for fun
https://github.com/siadat/gofile
cli file-server go http-server
Last synced: 4 months ago
JSON representation
HTTP/1.1 directory listing and file server using TCP sockets for fun
- Host: GitHub
- URL: https://github.com/siadat/gofile
- Owner: siadat
- Created: 2016-03-01T09:43:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T06:23:25.000Z (about 6 years ago)
- Last Synced: 2024-10-12T12:43:05.756Z (4 months ago)
- Topics: cli, file-server, go, http-server
- Language: Go
- Homepage:
- Size: 114 KB
- Stars: 60
- Watchers: 3
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Gofile
[](https://godoc.org/github.com/siadat/gofile/http)
[](https://travis-ci.org/siadat/gofile)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](https://godoc.org/github.com/siadat/gofile/http).

### Usage
Usage: gofile port [dir]
Examples:
gofile 8080
gofile 8080 ~/public### Install
go get -u github.com/siadat/gofile
### HTTP/1.1 implementation checklist
- [x] GET and HEAD methods
- [x] Support keep-alive connections
- [x] Support chunked transfer encoding
- [x] Requests must include a `Host` header
- [x] Requests with `Connection: close` should be closed
- [x] Support for requests with absolute URLs
- [x] If-Modified-Since support
- [x] Byte range support
- [ ] Transparent response compression### Hacking
Submit an issue or send a pull request.
Make sure you `./run-tests.bash` to test your patch.### Thanks
Thanks @valyala for his feature suggestions. Thanks @maruel for reviewing the http package.