Tests: goftm used for Go applications.
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"os"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nginx/unit"
|
"nginx/unit"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handler(w http.ResponseWriter, r *http.Request) {
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nginx/unit"
|
"nginx/unit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handler(w http.ResponseWriter, r *http.Request) {
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
var buf [32768]byte;
|
var buf [32768]byte
|
||||||
len, _ := r.Body.Read(buf[:])
|
len, _ := r.Body.Read(buf[:])
|
||||||
|
|
||||||
w.Header().Add("Content-Length", fmt.Sprintf("%v", len))
|
w.Header().Add("Content-Length", fmt.Sprintf("%v", len))
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"nginx/unit"
|
"nginx/unit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handler(w http.ResponseWriter, r *http.Request) {
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||||||
var buf [4096]byte;
|
var buf [4096]byte
|
||||||
len, _ := r.Body.Read(buf[:])
|
len, _ := r.Body.Read(buf[:])
|
||||||
|
|
||||||
w.Header().Set("Request-Method", r.Method)
|
w.Header().Set("Request-Method", r.Method)
|
||||||
|
|||||||
Reference in New Issue
Block a user