diff --git a/pkg/base/content.go b/pkg/base/content.go index dd17fa4d..a9a4c717 100644 --- a/pkg/base/content.go +++ b/pkg/base/content.go @@ -22,7 +22,8 @@ func (c *payload) read(rb *bufio.Reader, header Header) error { } 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) diff --git a/pkg/base/header.go b/pkg/base/header.go index 2b1309fc..f84f683d 100644 --- a/pkg/base/header.go +++ b/pkg/base/header.go @@ -53,7 +53,8 @@ func (h *Header) read(rb *bufio.Reader) error { } 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})