modify html redirect to send document directly instead of HTTP response
Signed-off-by: kim (grufwub) <grufwub@gmail.com>master
parent
06d204375c
commit
351daa2a27
@ -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…
Reference in New Issue