Skip to content

Commit

Permalink
Handle error message with space
Browse files Browse the repository at this point in the history
  • Loading branch information
ngraziano committed Mar 11, 2024
1 parent 17e69e8 commit 485d7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RTSP/RTSPHttpTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void Reconnect()
string? responseLine = streamReader.ReadLine();
if (string.IsNullOrEmpty(responseLine)) { throw new HttpBadResponseException("Empty response"); }

string[] tokens = responseLine.Split(' ');
string[] tokens = responseLine.Split(' ', 3);
if (tokens.Length != 3) { throw new HttpRequestException("Invalid first response line"); }

HttpStatusCode statusCode = (HttpStatusCode)int.Parse(tokens[1], NumberStyles.Integer, NumberFormatInfo.InvariantInfo);
Expand Down

0 comments on commit 485d7b3

Please sign in to comment.