mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp: using int rather than int64 for Response.ConentLength
This commit is contained in:
parent
94660e730b
commit
a57d3f66ff
|
@ -100,7 +100,7 @@ type Response struct {
|
|||
ProtoMinor int
|
||||
StatusCode int
|
||||
Status string
|
||||
ContentLength int64
|
||||
ContentLength int
|
||||
Header http.Header
|
||||
Body io.ReadCloser
|
||||
}
|
||||
|
@ -184,7 +184,10 @@ func ReadResponse(r io.Reader) (*Response, error) {
|
|||
}
|
||||
|
||||
// Get the content length from the header.
|
||||
resp.ContentLength, _ = strconv.ParseInt(resp.Header.Get("Content-Length"), 10, 64)
|
||||
resp.ContentLength, err = strconv.Atoi(resp.Header.Get("Content-Length"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resp.Body = closer{b, r}
|
||||
return resp, nil
|
||||
|
|
Loading…
Reference in New Issue