Closed
Description
Running the program below gives very different results. Sometimes hanging for three minutes until finally giving up, or going through without issue. This only tests the /compile endpoint. It's uncertain whether this affects the /share endpoint as well.
Worth flagging since we just switched over to flex on golang.org.
/cc @broady @dmitshur @bradfitz
package main
import (
"bytes"
"fmt"
"io"
"log"
"net/http"
"os"
"time"
)
func main() {
buf := bytes.NewBuffer([]byte("version=2&body=package+main%0Aimport+%22fmt%22%0Afunc+main()%7Bfmt
.Println(%22Hello%2C+%E4%B8%96%E7%95%8C%22)%7D"))
t := time.Now()
resp, err := http.Post("https://golang.org/compile", "application/x-www-form-urlencoded; charset=
UTF-8", buf)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
io.Copy(os.Stderr, resp.Body)
fmt.Fprintln(os.Stderr)
fmt.Fprintf(os.Stderr, "Took %v\n", time.Since(t))
}