Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxNetworkFramework.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxNetworkFramework.h	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxNetworkFramework.h	(revision 11401)
@@ -29,4 +29,5 @@
 #include <QThread>
 #include <QDataStream>
+#include <QStringList>
 
 typedef happyhttp::Connection HConnect;
@@ -52,5 +53,6 @@
     }
 
-    void postRequest (const QString &aHost, const QString &aUrl);
+    void postRequest (const QString &aHost, const QString &aUrl, const QString &aBody,
+                      const QStringList &aHeaders = QStringList());
 
 signals:
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxRegistrationDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxRegistrationDlg.h	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxRegistrationDlg.h	(revision 11401)
@@ -70,7 +70,6 @@
 private:
 
-    void postRequest (const QString &aHost, const QString &aPath);
+    void postRequest (const QString &aHost, const QString &aUrl, const QString &aBody);
     void abortRegisterRequest (const QString &aReason);
-    QString getPlatform();
     void finish();
 
Index: trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUpdateDlg.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUpdateDlg.h	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUpdateDlg.h	(revision 11401)
@@ -127,6 +127,6 @@
 
     /* Private functions */
-    void searchAbort (const QString &aReason);
-    void searchComplete (const QString &aFullList);
+    void networkAbort (const QString &aReason);
+    void processResponse (const QString &aResponse);
 
     /* Private variables */
Index: trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNetworkFramework.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNetworkFramework.cpp	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/src/VBoxNetworkFramework.cpp	(revision 11401)
@@ -132,5 +132,7 @@
 
 void VBoxNetworkFramework::postRequest (const QString &aHost,
-                                        const QString &aUrl)
+                                        const QString &aUrl,
+                                        const QString &aBody,
+                                        const QStringList &aHeaders)
 {
     /* Network requests thread class */
@@ -139,6 +141,8 @@
     public:
 
-        Thread (QObject *aProc, const QString &aHost, const QString &aUrl)
-            : mProc (aProc), mHost (aHost), mUrl (aUrl) {}
+        Thread (QObject *aHandler, const QString &aHost, const QString &aUrl,
+                const QString &aBody, const QStringList &aHeaders)
+            : mHandler (aHandler), mHost (aHost), mUrl (aUrl)
+            , mBody (aBody), mHeaders (aHeaders) {}
 
         virtual void run()
@@ -146,15 +150,30 @@
             try
             {
+                /* Create & setup connection */
                 HConnect conn (mHost.toAscii().constData(), 80);
-                conn.setcallbacks (onBegin, onData, onFinish, mProc);
-                const char *headers[] =
-                {
-                    "Connection", "close",
-                    "Content-type", "application/x-www-form-urlencoded",
-                    "Accept", "text/plain",
-                    0
-                };
-
-                conn.request ("POST", mUrl.toAscii().constData(), headers, 0, 0);
+                conn.setcallbacks (onBegin, onData, onFinish, mHandler);
+
+                /* Format POST request */
+                conn.putrequest ("POST", mUrl.toAscii().constData());
+
+                /* Append standard headers */
+                conn.putheader ("Connection", "close");
+                conn.putheader ("Content-Length", mBody.size());
+                conn.putheader ("Content-type", "application/x-www-form-urlencoded");
+                conn.putheader ("Accept", "text/plain");
+
+                /* Append additional headers */
+                for (int i = 0; i < mHeaders.size(); i = i + 2)
+                    conn.putheader (mHeaders [i].toAscii().constData(),
+                                    mHeaders [i + 1].toAscii().constData());
+
+                /* Finishing header */
+                conn.endheaders();
+
+                /* Append & send body */
+                conn.send ((const unsigned char*) mBody.toAscii().constData(),
+                           mBody.toAscii().size());
+
+                /* Pull the connection for response */
                 while (conn.outstanding())
                     conn.pump();
@@ -162,5 +181,5 @@
             catch (happyhttp::Wobbly &ex)
             {
-                QApplication::postEvent (mProc, new PostErrorEvent (ex.what()));
+                QApplication::postEvent (mHandler, new PostErrorEvent (ex.what()));
             }
         }
@@ -168,7 +187,9 @@
     private:
 
-        QObject  *mProc;
-        QString   mHost;
-        QString   mUrl;
+        QObject *mHandler;
+        QString mHost;
+        QString mUrl;
+        QString mBody;
+        QStringList mHeaders;
     };
 
@@ -176,5 +197,5 @@
         mNetworkThread->wait (1000);
     delete mNetworkThread;
-    mNetworkThread = new Thread (this, aHost, aUrl);
+    mNetworkThread = new Thread (this, aHost, aUrl, aBody, aHeaders);
     mNetworkThread->start();
 }
Index: trunk/src/VBox/Frontends/VirtualBox4/src/VBoxRegistrationDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/src/VBoxRegistrationDlg.cpp	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/src/VBoxRegistrationDlg.cpp	(revision 11401)
@@ -332,6 +332,6 @@
 
     /* Handshake */
-    QString argument = QString ("?version=%1").arg (version);
-    postRequest (mUrl.host(), mUrl.path() + argument);
+    QString body = QString ("version=%1").arg (version);
+    postRequest (mUrl.host(), mUrl.path(), body);
 }
 
@@ -341,5 +341,5 @@
     mHandshake = false;
     QString version = vboxGlobal().virtualBox().GetVersion();
-    QString platform = getPlatform();
+    QString platform = vboxGlobal().platformInfo();
     QString name = mLeName->text();
     QString email = mLeEmail->text();
@@ -351,13 +351,13 @@
 
     /* Registration */
-    QString argument;
-    argument += QString ("?version=%1").arg (version);
-    argument += QString ("&key=%1").arg (mKey);
-    argument += QString ("&platform=%1").arg (platform);
-    argument += QString ("&name=%1").arg (name);
-    argument += QString ("&email=%1").arg (email);
-    argument += QString ("&private=%1").arg (prvt);
-
-    postRequest (mUrl.host(), mUrl.path() + argument);
+    QString body;
+    body += QString ("version=%1").arg (version);
+    body += QString ("&key=%1").arg (mKey);
+    body += QString ("&platform=%1").arg (platform);
+    body += QString ("&name=%1").arg (name);
+    body += QString ("&email=%1").arg (email);
+    body += QString ("&private=%1").arg (prvt);
+
+    postRequest (mUrl.host(), mUrl.path(), body);
 }
 
@@ -442,5 +442,6 @@
 
 void VBoxRegistrationDlg::postRequest (const QString &aHost,
-                                       const QString &aPath)
+                                       const QString &aUrl,
+                                       const QString &aBody)
 {
     delete mNetfw;
@@ -455,5 +456,5 @@
              SLOT (onNetError (const QString&)));
     mTimeout->start (MaxWaitTime);
-    mNetfw->postRequest (aHost, aPath);
+    mNetfw->postRequest (aHost, aUrl, aBody);
 }
 
@@ -475,86 +476,4 @@
 }
 
-QString VBoxRegistrationDlg::getPlatform()
-{
-    QString platform;
-
-#if defined (Q_OS_WIN)
-    platform = "win";
-#elif defined (Q_OS_LINUX)
-    platform = "linux";
-#elif defined (Q_OS_MACX)
-    platform = "macosx";
-#elif defined (Q_OS_OS2)
-    platform = "os2";
-#elif defined (Q_OS_FREEBSD)
-    platform = "freebsd";
-#elif defined (Q_OS_SOLARIS)
-    platform = "solaris";
-#else
-    platform = "unknown";
-#endif
-
-    /* the format is <system>.<bitness> */
-    platform += QString (".%1").arg (ARCH_BITS);
-
-    /* add more system information */
-#if defined (Q_OS_WIN)
-    OSVERSIONINFO versionInfo;
-    ZeroMemory (&versionInfo, sizeof (OSVERSIONINFO));
-    versionInfo.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
-    GetVersionEx (&versionInfo);
-    int major = versionInfo.dwMajorVersion;
-    int minor = versionInfo.dwMinorVersion;
-    int build = versionInfo.dwBuildNumber;
-    QString sp = QString::fromUtf16 ((ushort*)versionInfo.szCSDVersion);
-
-    QString distrib;
-    if (major == 6)
-        distrib = QString ("Windows Vista %1");
-    else if (major == 5)
-    {
-        if (minor == 2)
-            distrib = QString ("Windows Server 2003 %1");
-        else if (minor == 1)
-            distrib = QString ("Windows XP %1");
-        else if (minor == 0)
-            distrib = QString ("Windows 2000 %1");
-        else
-            distrib = QString ("Unknown %1");
-    }
-    else if (major == 4)
-    {
-        if (minor == 90)
-            distrib = QString ("Windows Me %1");
-        else if (minor == 10)
-            distrib = QString ("Windows 98 %1");
-        else if (minor == 0)
-            distrib = QString ("Windows 95 %1");
-        else
-            distrib = QString ("Unknown %1");
-    }
-    else
-        distrib = QString ("Unknown %1");
-    distrib = distrib.arg (sp);
-    QString version = QString ("%1.%2").arg (major).arg (minor);
-    QString kernel = QString ("%1").arg (build);
-    platform += QString (" [Distribution: %1 | Version: %2 | Build: %3]")
-        .arg (distrib).arg (version).arg (kernel);
-#elif defined (Q_OS_OS2)
-    // TODO: add sys info for os2 if any...
-#elif defined (Q_OS_LINUX) || defined (Q_OS_MACX) || defined (Q_OS_FREEBSD) || defined (Q_OS_SOLARIS)
-    /* Get script path */
-    char szAppPrivPath [RTPATH_MAX];
-    int rc = RTPathAppPrivateNoArch (szAppPrivPath, sizeof (szAppPrivPath));
-    Assert (RT_SUCCESS (rc));
-    /* Run script */
-    QByteArray result =
-        Process::singleShot (QString (szAppPrivPath) + "/VBoxSysInfo.sh");
-    if (!result.isNull())
-        platform += QString (" [%1]").arg (QString (result).trimmed());
-#endif
-    return platform;
-}
-
 void VBoxRegistrationDlg::finish()
 {
Index: trunk/src/VBox/Frontends/VirtualBox4/src/VBoxUpdateDlg.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox4/src/VBoxUpdateDlg.cpp	(revision 11400)
+++ trunk/src/VBox/Frontends/VirtualBox4/src/VBoxUpdateDlg.cpp	(revision 11401)
@@ -221,5 +221,5 @@
     , mNetfw (0)
     , mTimeout (new QTimer (this))
-    , mUrl ("http://www.virtualbox.org/download/latest_version")
+    , mUrl ("http://innotek.de/query.php")
     , mForceRun (aForceRun)
     , mSuicide (false)
@@ -284,8 +284,5 @@
 void VBoxUpdateDlg::search()
 {
-    /* Show progress bar */
-    mPbCheck->show();
-
-    /* Start downloading latest releases file */
+    /* Create & setup network framework */
     mNetfw = new VBoxNetworkFramework();
     connect (mNetfw, SIGNAL (netBegin (int)),
@@ -297,6 +294,16 @@
     connect (mNetfw, SIGNAL (netError (const QString&)),
              SLOT (onNetError (const QString&)));
+
+    QString body = QString ("platform=%1")
+                   .arg (vboxGlobal().virtualBox().GetPackageType());
+    QStringList header ("User-Agent");
+    header << QString ("VirtualBox %1 <%2>")
+              .arg (vboxGlobal().virtualBox().GetVersion())
+              .arg (vboxGlobal().platformInfo());
+
+    /* Show progress bar & send composed information */
+    mPbCheck->show();
     mTimeout->start (MaxWaitTime);
-    mNetfw->postRequest (mUrl.host(), mUrl.path());
+    mNetfw->postRequest (mUrl.host(), mUrl.path(), body, header);
 }
 
@@ -309,5 +316,5 @@
 void VBoxUpdateDlg::processTimeout()
 {
-    searchAbort (tr ("Connection timed out."));
+    networkAbort (tr ("Connection timed out."));
 }
 
@@ -318,5 +325,5 @@
 
     if (aStatus == 404)
-        searchAbort (tr ("Could not locate the latest version "
+        networkAbort (tr ("Could not locate the latest version "
             "list on the server (response: %1).").arg (aStatus));
     else
@@ -338,5 +345,5 @@
 
     mTimeout->stop();
-    searchComplete (aTotalData);
+    processResponse (aTotalData);
 }
 
@@ -344,5 +351,5 @@
 void VBoxUpdateDlg::onNetError (const QString &aError)
 {
-    searchAbort (aError);
+    networkAbort (aError);
 }
 
@@ -355,5 +362,5 @@
 }
 
-void VBoxUpdateDlg::searchAbort (const QString &aReason)
+void VBoxUpdateDlg::networkAbort (const QString &aReason)
 {
     /* Protect against double kill request. */
@@ -380,61 +387,47 @@
 }
 
-void VBoxUpdateDlg::searchComplete (const QString &aFullList)
+void VBoxUpdateDlg::processResponse (const QString &aResponse)
 {
     /* Hide progress bar */
     mPbCheck->hide();
 
-    QStringList list = aFullList.split ("\n", QString::SkipEmptyParts);
-
-    QString latestVersion (list [0]);
-    latestVersion.remove (QRegExp ("Version: "));
-    QString currentVersion (vboxGlobal().virtualBox().GetVersion());
-    VBoxVersion cv (currentVersion);
-    VBoxVersion lv (latestVersion);
-
-    if (cv < lv)
-    {
-        /* Search for the current platform link */
-        QString packageType = vboxGlobal().virtualBox().GetPackageType();
-        for (int i = 1; i < list.size(); ++ i)
-        {
-            QStringList platformInfo = list [i].split (": ");
-            if (packageType == platformInfo [0])
-            {
-                /* If newer version of necessary package found */
-                if (isHidden())
-                {
-                    /* For background update */
-                    vboxProblem().showUpdateSuccess (vboxGlobal().mainWindow(),
-                        lv.toString(), platformInfo [1]);
-                    QTimer::singleShot (0, this, SLOT (accept()));
-                }
-                else
-                {
-                    /* For wizard update */
-                    mTextSuccessInfo->setText (mTextSuccessInfo->text()
-                        .arg (lv.toString(), platformInfo [1], platformInfo [1]));
-                    mTextSuccessInfo->show();
-                    mPageStack->setCurrentIndex (1);
-                }
-                return;
-            }
-        }
-    }
-
-    /* If no newer version of necessary package found */
-    if (isHidden())
-    {
-        /* For background update */
-        if (mForceRun)
-            vboxProblem().showUpdateNotFound (vboxGlobal().mainWindow());
-        QTimer::singleShot (0, this, SLOT (accept()));
-    }
-    else
-    {
-        /* For wizard update */
-        mTextNotFoundInfo->show();
-        mPageStack->setCurrentIndex (1);
-    }
-}
-
+    if (aResponse.indexOf (QRegExp ("^\\d+\\.\\d+\\.\\d+ \\S+$")) == 0)
+    {
+        /* Newer version of necessary package found */
+        QStringList response = aResponse.split (" ", QString::SkipEmptyParts);
+
+        if (isHidden())
+        {
+            /* For background update */
+            vboxProblem().showUpdateSuccess (vboxGlobal().mainWindow(),
+                response [0], response [1]);
+            QTimer::singleShot (0, this, SLOT (accept()));
+        }
+        else
+        {
+            /* For wizard update */
+            mTextSuccessInfo->setText (mTextSuccessInfo->text()
+                .arg (response [0], response [1], response [1]));
+            mTextSuccessInfo->show();
+            mPageStack->setCurrentIndex (1);
+        }
+    }
+    else /* if (aResponse == "UPTODATE") */
+    {
+        /* No newer version of necessary package found */
+        if (isHidden())
+        {
+            /* For background update */
+            if (mForceRun)
+                vboxProblem().showUpdateNotFound (vboxGlobal().mainWindow());
+            QTimer::singleShot (0, this, SLOT (accept()));
+        }
+        else
+        {
+            /* For wizard update */
+            mTextNotFoundInfo->show();
+            mPageStack->setCurrentIndex (1);
+        }
+    }
+}
+
