From 0f37ff560cefe7d00a9eff01939b837aac19f2ac Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Thu, 28 Jan 2021 21:39:24 +0100 Subject: [PATCH] increase maximum RTSP path length to 2048 chars (https://github.com/aler9/rtsp-simple-server/issues/192) --- pkg/base/request.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/base/request.go b/pkg/base/request.go index d4ad9e9c..24b08f93 100644 --- a/pkg/base/request.go +++ b/pkg/base/request.go @@ -10,9 +10,9 @@ import ( const ( rtspProtocol10 = "RTSP/1.0" - requestMaxLethodLength = 128 - requestMaxPathLength = 1024 - requestMaxProtocolLength = 128 + requestMaxMethodLength = 64 + requestMaxPathLength = 2048 + requestMaxProtocolLength = 64 ) // Method is the method of a RTSP request. @@ -53,7 +53,7 @@ type Request struct { // Read reads a request. func (req *Request) Read(rb *bufio.Reader) error { - byts, err := readBytesLimited(rb, ' ', requestMaxLethodLength) + byts, err := readBytesLimited(rb, ' ', requestMaxMethodLength) if err != nil { return err }