cleanup var names

This commit is contained in:
Pierre Dubouilh 2018-09-12 19:21:45 +02:00
parent ba42b00304
commit 496490ba29
5 changed files with 7 additions and 7 deletions

View file

@ -6,7 +6,7 @@ build:
build-all:
make embed
env GOOS=linux GOARCH=amd64 go build gossa.go
mv gossa gossa-linux
mv gossa gossa-linux64
env GOOS=linux GOARCH=arm go build gossa.go
mv gossa gossa-linux-arm
env GOOS=linux GOARCH=arm64 go build gossa.go
@ -20,7 +20,7 @@ build-all:
clean:
-rm gossa.go
-rm gossa
-rm gossa-linux
-rm gossa-linux64
-rm gossa-linux-arm
-rm gossa-linux-arm64
-rm gossa-mac

View file

@ -156,7 +156,7 @@ func doContent(w http.ResponseWriter, r *http.Request) {
}
func upload(w http.ResponseWriter, r *http.Request) {
unescaped, _ := url.PathUnescape(r.Header.Get("bossa-path"))
unescaped, _ := url.PathUnescape(r.Header.Get("gossa-path"))
fullPath, err := checkPath(unescaped)
logVerb("Up", err, fullPath)
@ -232,7 +232,7 @@ func main() {
}
var hostString = *host + ":" + *port
fmt.Println("Bossa startig on directory " + initPath)
fmt.Println("Gossa startig on directory " + initPath)
fmt.Println("Listening on http://" + hostString)
var root = http.Dir(initPath)

View file

@ -35,7 +35,7 @@ func postDummyFile(t *testing.T, url string, path string) string {
req, err := http.NewRequest("POST", url, body)
dieMaybe(t, err)
req.Header.Set("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundarycCRIderiXxJWEUcU")
req.Header.Set("Bossa-Path", path)
req.Header.Set("Gossa-Path", path)
resp, err := http.DefaultClient.Do(req)
dieMaybe(t, err)

View file

@ -3,7 +3,7 @@ gossa
![e](https://user-images.githubusercontent.com/760637/45410804-f2c00e80-b672-11e8-8c2b-51d7fc0915aa.gif)
[![Build Status](https://travis-ci.org/pldubouilh/bossa.svg?branch=master)](https://travis-ci.org/pldubouilh/bossa)
[![Build Status](https://travis-ci.org/pldubouilh/gossa.svg?branch=master)](https://travis-ci.org/pldubouilh/gossa)
🎶 A fast and simple webserver for your files. It's dependency-free and with under 250 lines for the server code, easily code-reviewable.

View file

@ -73,7 +73,7 @@ function postFile (file, path) {
path = decodeURI(location.pathname).slice(0, -1) + path
xhr.open('POST', window.location.origin + '/post')
xhr.setRequestHeader("bossa-path", encodeURIComponent(path))
xhr.setRequestHeader("gossa-path", encodeURIComponent(path))
xhr.upload.id = newBar(path)
const formData = new window.FormData()