mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
Backend: Use IndexRune instead of Index for splitting Content-Type header checking errors.
This commit is contained in:
parent
5f0dc3ce6f
commit
e1522456b4
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ func (backend *backendInfo) SendRemoteCommand(remoteCommand, data string, auth A
|
|||
} else if resp.StatusCode < 200 || resp.StatusCode > 299 { // any non-2xx
|
||||
// If the Content-Type header includes a charset, ignore it.
|
||||
typeStr := resp.Header.Get("Content-Type")
|
||||
splitIdx := strings.Index(typeStr, ";")
|
||||
splitIdx := strings.IndexRune(typeStr, ';')
|
||||
if ( splitIdx != -1 ) {
|
||||
typeStr = strings.TrimSpace(typeStr[0:splitIdx])
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue