Skip to content

v0.1.0

Compare
Choose a tag to compare
@bddjr bddjr released this 19 Jun 15:05
· 138 commits to main since this release
99738dd

Add Response struct, fix name

go get github.com/bddjr/[email protected]
srv.Hlfhr_HttpOnHttpsPortErrorHandler = func(rb []byte, conn net.Conn) {
	resp := hlfhr.NewResponse(conn)
	// 302 Found
	if host, path, ok := hlfhr.ReadReqHostPath(rb); ok {
		resp.Redirect(302, fmt.Sprint("https://", host, path))
		return
	}
	// script
	resp.ScriptRedirect()
}