PDA

View Full Version : QAuthenticator - how do I change uri



SailingDreams
21st May 2009, 19:48
I am sending an HTTP GET command with the code below:


QString httpCommand = ("/axis-media/media.amp?videocodec=h264");

// Use Request instead of get in order to set cookie.
// Create Header
QHttpRequestHeader header("GET", httpCommand);
header.setValue("Host", m_Host);
header.setValue("Cache-Control", "no-cache");
header.setValue("Connection", "Keep-Alive");
header.setValue("x-sessioncookie", "123456789");

// Send Get Requests
int res = m_HttpVideo.request(header);



The output gives me an Authorization uri that also contains ?videocodec=h264. See below (captured on waveshark):


GET /axis-media/media.amp?videocodec=h264 HTTP/1.1
Host: 169.xxx.xxx.xxx
Cache-Control: no-cache
Connection: Keep-Alive
x-sessioncookie: 123456789
Authorization: Digest username="root", realm="AXIS_00408C943C65",
nonce="00001c86Y8265782d13f595995eddef04419da03a5abc5",
uri="/axis-media/media.amp?videocodec=h264",
response="32ae033bc3a5d10c67efd8c2246716cf", qop=auth, nc=00000001,
cnonce="de29e2a5683f6d43d65435a99ccba54a"

But I need the Authorization uri to look like this:


uri="/axis-media/media.amp",

instead of


uri="/axis-media/media.amp?videocodec=h264",

Any ideas on how to do this?

Thanks