Merge pull request #196 from OrdosX/master

修复"Pull stream err: EOF"
pull/200/head
milkyway river 2020-08-03 17:09:51 +08:00 committed by GitHub
commit 5c957a2a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ func (client *RTSPClient) RequestWithPath(method string, path string, headers ma
// return // return
// } // }
//} //}
if strings.Index(s, "Content-Length:") == 0 { if strings.Index(strings.ToLower(s), "content-length:") == 0 {
splits := strings.Split(s, ":") splits := strings.Split(s, ":")
contentLen, err = strconv.Atoi(strings.TrimSpace(splits[1])) contentLen, err = strconv.Atoi(strings.TrimSpace(splits[1]))
if err != nil { if err != nil {