Trok
29th September 2011, 22:44
Hi, i have difficulty with encoding http request by function toEncoded(), it encode only some characters.
It's my code:
request.setUrl(QUrl(sUrl));
QUrl postData;
postData.addQueryItem("ctl00$MainContent$txtHashes", lHashes);
postData.addQueryItem("ctl00$MainContent$txtCaptcha", sCaptcha);
postData.addQueryItem("__VIEWSTATE", this->sViewState);
postData.addQueryItem("__EVENTVALIDATION", this->sEventValidation);
postData.addQueryItem("ctl00$MainContent$btnDecrypt", " Decrypt Hashes ");
reply = manager->post(request, postData.toEncoded());
When return the postData.toEncoded(), it doeasn't change some characters, for example '/' or '$'. I don't know why this function doesn't work correctly.
In result i receive error source page:
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/error.aspx?aspxerrorpath=/sha1-decrypt.aspx">here</a>.</h2>
</body></html>
I wait for some idea to resolve my problem.
It's my code:
request.setUrl(QUrl(sUrl));
QUrl postData;
postData.addQueryItem("ctl00$MainContent$txtHashes", lHashes);
postData.addQueryItem("ctl00$MainContent$txtCaptcha", sCaptcha);
postData.addQueryItem("__VIEWSTATE", this->sViewState);
postData.addQueryItem("__EVENTVALIDATION", this->sEventValidation);
postData.addQueryItem("ctl00$MainContent$btnDecrypt", " Decrypt Hashes ");
reply = manager->post(request, postData.toEncoded());
When return the postData.toEncoded(), it doeasn't change some characters, for example '/' or '$'. I don't know why this function doesn't work correctly.
In result i receive error source page:
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/error.aspx?aspxerrorpath=/sha1-decrypt.aspx">here</a>.</h2>
</body></html>
I wait for some idea to resolve my problem.