Gofile
HTTP/1.1 directory listing and file server using TCP sockets for fun
Install / Use
/learn @siadat/GofileREADME
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.

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
Hostheader - [x] Requests with
Connection: closeshould 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.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
