switch to std http implementation instead of fasthttp (#106)
close #100 close #109 close #113 close #28 close #63 Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/106
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
package utils
|
||||
|
||||
import "bytes"
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func TrimHostPort(host []byte) []byte {
|
||||
i := bytes.IndexByte(host, ':')
|
||||
func TrimHostPort(host string) string {
|
||||
i := strings.IndexByte(host, ':')
|
||||
if i >= 0 {
|
||||
return host[:i]
|
||||
}
|
||||
|
Reference in New Issue
Block a user