Tests: goftm used for Go applications.

This commit is contained in:
Andrey Zelenkov
2019-08-14 14:06:28 +03:00
parent b3b7013eda
commit 8904c87c6b
8 changed files with 78 additions and 78 deletions

View File

@@ -1,12 +1,12 @@
package main
import (
"io"
"os"
"fmt"
"strings"
"io"
"net/http"
"nginx/unit"
"os"
"strings"
)
func handler(w http.ResponseWriter, r *http.Request) {

View File

@@ -1,14 +1,14 @@
package main
import (
"io"
"fmt"
"io"
"net/http"
"nginx/unit"
)
func handler(w http.ResponseWriter, r *http.Request) {
var buf [32768]byte;
var buf [32768]byte
len, _ := r.Body.Read(buf[:])
w.Header().Add("Content-Length", fmt.Sprintf("%v", len))

View File

@@ -1,14 +1,14 @@
package main
import (
"io"
"fmt"
"io"
"net/http"
"nginx/unit"
)
func handler(w http.ResponseWriter, r *http.Request) {
var buf [4096]byte;
var buf [4096]byte
len, _ := r.Body.Read(buf[:])
w.Header().Set("Request-Method", r.Method)