Home > other >  Golang ServeHTTP make proxy error EOF on POST request
Golang ServeHTTP make proxy error EOF on POST request

Time:01-31

I’m working on proxy server with gin and ServeHTTP. 
Actually GET and OPTIONS request works well. But when I trying multiples POST request I get EOF error one in two request. I’ve test to make repeat request without proxy service and its work well, so there is something not working in my code.

Edit :

  1. I have test POST proxy with enter image description here

    enter image description here

    appendix

    backend server code

    package main
    
    import (
        "fmt"
    
        "github.com/gin-gonic/gin"
    )
    
    func main() {
        fmt.Println("Starting server")
        router := gin.Default()
        router.POST("/*any", func(c *gin.Context) {
            c.JSON(200, gin.H{
                "mes": "hello",
            })
        })
        router.Run(":8888")
    }
    
    
  •  Tags:  
  • Related