ARTSPConnection: HTTP Authentication: Fix URI bounds

When parsing the DESCRIBE response of an RTSP server, the end of the
URI is one character too long. This causes an additional space to be
copied into the authorization header, which some servers reject.

Example:
* DESCRIBE rtsp://10.0.0.1:1234/Streaming/Channels/202 RTSP/1.0
* Authorization: Digest nonce="[nonce]", username="[user]", uri="rtsp://10.0.0.1:1234/Streaming/Channels/202 ", response="[res]"

Change-Id: Idb4e201578a2a2a0e4c59abad609816641a4dd99
gugelfrei
Hendrik Hagendorn 5 years ago
parent 5c031de662
commit 14d88efaab

@ -954,7 +954,7 @@ static void GetMethodAndURL(
CHECK_GE(space2, 0);
method->setTo(request, 0, space1);
url->setTo(request, space1 + 1, space2 - space1);
url->setTo(request, space1 + 1, space2 - space1 - 1);
}
void ARTSPConnection::addAuthentication(AString *request) {

Loading…
Cancel
Save