this fixes Digest Auth for the mjpeg stream on a TV-IP302PI

Digest Auth worked for the RTSP stream, but not http.
This adds quotes around the cnonce value, which matches what curl and wget do and adds the algorithm line which also matches what curl and wget do.  With these two changes the auth is accepted.
pull/691/head
Isaac Connor 2015-02-04 13:50:19 -05:00
parent 20fec3ed7a
commit b22608fb07
1 changed files with 2 additions and 1 deletions

View File

@ -114,9 +114,10 @@ std::string Authenticator::getAuthHeader(std::string method, std::string uri)
if ( ! fQop.empty() ) {
result += ", qop=" + fQop;
result += ", nc=" + stringtf("%08x",nc);
result += ", cnonce=" + fCnonce;
result += ", cnonce=\"" + fCnonce "\"";
}
result += ", response=\"" + computeDigestResponse(method, uri) + "\"";
result += ", algorithm=\"MD5\"";
//Authorization: Digest username="zm",
// realm="NC-336PW-HD-1080P",