How to set password format to send on a server...
I suppose not set on plain text ... hash or md5???

Server apache2 make Ldap autenfication but is similar to .htpasswd

http = new QHttp(this);
http->setHost(urls.host(),80);
http->setUser( current_user , current_pass );


Qt Code:
  1. void Gui_Wget::downloadFile()
  2. {
  3. if (url.size() > 1 || currentfile.size() > 1 )
  4. {
  5. QUrl urls(url);
  6. if (is_file(currentfile)) {
  7. qt_unlink(currentfile);
  8. }
  9. file = new QFile(currentfile);
  10. if (!file->open(QIODevice::WriteOnly)) {
  11. QMessageBox::information(this, tr("File Error!"),
  12. tr("Unable to save the file %1: %2.")
  13. .arg(currentfile).arg(file->errorString()));
  14. delete file;
  15. file = 0;
  16. return;
  17. }
  18.  
  19. http = new QHttp(this);
  20. stopButton->setEnabled(true);
  21. http->setHost(urls.host(),80);
  22. http->setUser( current_user , current_pass );
  23.  
  24. statusLabel->setText(tr("Download Url:")+" "+url);
  25. connect(http, SIGNAL(dataReadProgress(int, int)),this, SLOT(updateDataReadProgress(int, int)));
  26. connect(http, SIGNAL(requestFinished(int, bool)),this, SLOT(httpRequestFinished(int, bool)));
  27. connect(http, SIGNAL(dataReadProgress(int, int)),this, SLOT(updateDataReadProgress(int, int)));
  28. connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
  29. connect(stopButton, SIGNAL(clicked()), this, SLOT(cancelDownload()));
  30.  
  31. httpRequestAborted = false;
  32. httpGetId = http->get(urls.path(), file);
  33. downloadButton->setEnabled(false);
  34.  
  35. }
  36.  
  37.  
  38. }
To copy to clipboard, switch view to plain text mode