modify html redirect to send document directly instead of HTTP response

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
master
kim (grufwub) 4 years ago
parent 06d204375c
commit 351daa2a27

@ -29,5 +29,5 @@ func generateHtmlRedirect(url string) []byte {
"</body>\n"+
"</html>\n"
return generateHttpResponse(ErrorResponse200, content)
return []byte(content)
}

@ -1,15 +0,0 @@
package main
import (
"strconv"
)
func generateHttpResponse(code ErrorResponseCode, data string) []byte {
dataLength := len(data)
return []byte(
"HTTP/1.1 "+code.String()+"\n"+
"Content-Length: "+strconv.Itoa(dataLength)+"\n"+
"Connection: close\n"+
"Content-Type: text/html\n\n"+
data)
}
Loading…
Cancel
Save