半岛的蒟蒻bddjr
半岛的蒟蒻bddjr
I just found a more standard request parsing method ```go req, err := http.ReadRequest(bufio.NewReader(bytes.NewReader(requestBytes))) if err != nil { fmt.Println(err) return } io.WriteString(conn, fmt.Sprintf( "HTTP/1.1 307 Temporary Redirect\r\nLocation: https://%s%s\r\nConnection: close\r\n\r\nClient...
🤔I just tried, it doesn't work, I'll see if there's an interface to continue reading The request content cannot exceed 576 bytes, otherwise the request cannot be parsed
I successfully read the remaining bytes from conn server.go ```go // net/http: configurable error message for Client sent an HTTP request to an HTTPS server. // https://go.dev/issue/49310 func (c *conn)...
If this is enough, I will submit a PullRequest @mitar TLSConfig ```go type Config struct { // HttpOnHttpsPortErrorResponseString is sent on an HTTPS connection // which receives what looks like...
> Also, what is `badRequestResponse` in `HttpOnHttpsPortErrorHandler`? It will be `TLSConfig.HttpOnHttpsPortErrorResponse` ```go // Read Response string badRequestResponse := c.server.TLSConfig.HttpOnHttpsPortErrorResponse if badRequestResponse == "" { badRequestResponse = "HTTP/1.1 400 Bad Request\r\nConnection:...
# ✨ I made a go mod hijacking `net.Conn` to implement this feature ## https://github.com/bddjr/hlfhr ```go var srv *hlfhr.Server func main() { // Use hlfhr.New srv = hlfhr.New(&http.Server{ Addr: ":5678",...
从原理上讲,这个问题与另一个问题不是同一个问题,但可以被同时解决 https://github.com/1Panel-dev/1Panel/discussions/5113
求1.19.2的jar