BogdanovKirill / RtspClientSharp

Pure C# RTSP client for .NET Standard without external dependencies and with true async nature. I welcome contributions.
MIT License
694 stars 284 forks source link

white spaces in Server URI #94

Open CvvtLo opened 3 years ago

CvvtLo commented 3 years ago

If the RTSP.URL contains white spaces, the user can add percent encoding with %20.

Example

var serverUri = new Uri("rtsp://127.0.0.1:8554/Camera%201/live");

However in the public override string ToString() method of RtspRequestMessage.cs the ConnectionUri property is used which does not contain the percent encoding anymore.

I would suggest to use the ConnectionUri.AbsoluteUri instead.

      queryBuilder.AppendFormat("{0} {1} RTSP/{2}\r\n", Method, ConnectionUri.AbsoluteUri, ProtocolVersion.ToString(2));

Please advise