Skip to content
HTTP/1.1 directory listing and file server using TCP sockets
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
http
test-fixtures
.gitignore
.travis.yml
CHANGELOG.md
README.md
fileserver.go
main.go
run-tests.bash
tests.bash

README.md

Gofile

GoDoc Build Status

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.

gofile

Usage

Usage: gofile port [dir]

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

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.

You can’t perform that action at this time.