github.com/siadat/gofile

HTTP/1.1 directory listing and file server using TCP sockets


Keywords
cli, file-server, go, http-server
Install
go get github.com/siadat/gofile

Documentation

Gofile

A tiny directory listing web server. It implementats HTTP/1.1 keepalive and chunked transfer encoding.

This tool is built for learning purpose only. It is not intended to be used in production.

gofile

Usage

Usage: gofile [-v] <port> [<root>]

Examples:

gofile 8080
gofile 8080 ~/public

Install

go get -u github.com/siadat/gofile

HTTP/1.1 implementation checklist

  • GET and HEAD methods
  • Support keep-alive connections
  • Support chunked transfer encoding
  • Requests must include a Host header
  • Requests with Connection: close should be closed
  • Support for requests with absolute URLs
  • If-Modified-Since support
  • Byte range support
  • Transparent response compression
  • Optimize for speed