mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
add more details to errors
This commit is contained in:
@@ -22,7 +22,8 @@ func (c *payload) read(rb *bufio.Reader, header Header) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cl > rtspMaxContentLength {
|
if cl > rtspMaxContentLength {
|
||||||
return fmt.Errorf("Content-Length exceeds %d", rtspMaxContentLength)
|
return fmt.Errorf("Content-Length exceeds %d (it's %d)",
|
||||||
|
rtspMaxContentLength, cl)
|
||||||
}
|
}
|
||||||
|
|
||||||
*c = make([]byte, cl)
|
*c = make([]byte, cl)
|
||||||
|
@@ -53,7 +53,8 @@ func (h *Header) read(rb *bufio.Reader) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(*h) >= headerMaxEntryCount {
|
if len(*h) >= headerMaxEntryCount {
|
||||||
return fmt.Errorf("headers count exceeds %d", headerMaxEntryCount)
|
return fmt.Errorf("headers count exceeds %d (it's %d)",
|
||||||
|
headerMaxEntryCount, len(*h))
|
||||||
}
|
}
|
||||||
|
|
||||||
key := string([]byte{byt})
|
key := string([]byte{byt})
|
||||||
|
Reference in New Issue
Block a user