rtspconnection: Ignore trailing whitespace in rtsp headers
requested to merge eric.chandrasekhar/gstreamer-eric-fork:handle-trailing-spaces-in-rtsp-header-parsing into main
Issue described here: #2988
In summary, trailing whitespace within the WWW-Authenticate
RTSP auth header breaks the parsing going on within the rtspconnection.
For a header like WWW-Authenticate: Digest realm="FII_NS_CPD", nonce="990d51c37b1f651153afcb5f619f891b"
, the trailing extra space is causing nonce="990d51c37b1f651153afcb5f619f891b"
to be split into a separate header, making it no longer tied to the Digest auth header. This is breaking authentication since this nonce value is required for Digest auth.
This change makes it so that trailing whitespace doesn't cause headers to be split up, unless there is more text following that whitespace.