Skip to content

Commit

Permalink
Release 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sgreben committed Dec 8, 2019
1 parent 182b5fa commit 0238663
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 1.5.0
VERSION = 1.5.1

APP := http-file-server
PACKAGES := $(shell go list -f {{.Dir}} ./...)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ Or [download a binary](https://github.com/sgreben/http-file-server/releases/late

```sh
# Linux
curl -L https://github.com/sgreben/http-file-server/releases/download/1.5.0/http-file-server_1.5.0_linux_x86_64.tar.gz | tar xz
curl -L https://github.com/sgreben/http-file-server/releases/download/1.5.1/http-file-server_1.5.1_linux_x86_64.tar.gz | tar xz

# OS X
curl -L https://github.com/sgreben/http-file-server/releases/download/1.5.0/http-file-server_1.5.0_osx_x86_64.tar.gz | tar xz
curl -L https://github.com/sgreben/http-file-server/releases/download/1.5.1/http-file-server_1.5.1_osx_x86_64.tar.gz | tar xz

# Windows
curl -LO https://github.com/sgreben/http-file-server/releases/download/1.5.0/http-file-server_1.5.0_windows_x86_64.zip
unzip http-file-server_1.5.0_windows_x86_64.zip
curl -LO https://github.com/sgreben/http-file-server/releases/download/1.5.1/http-file-server_1.5.1_windows_x86_64.zip
unzip http-file-server_1.5.1_windows_x86_64.zip
```

## Use it
Expand Down
2 changes: 2 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"html/template"
"io"
"log"
"math"
"net/http"
"net/url"
Expand Down Expand Up @@ -224,6 +225,7 @@ func (f *fileHandler) serveUploadTo(w http.ResponseWriter, r *http.Request, osPa

// ServeHTTP is http.Handler.ServeHTTP
func (f *fileHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
log.Printf("[%s] %s %s %s", f.path, r.RemoteAddr, r.Method, r.URL.String())
urlPath := r.URL.Path
if !strings.HasPrefix(urlPath, "/") {
urlPath = "/" + urlPath
Expand Down

0 comments on commit 0238663

Please sign in to comment.