Index: /trunk/include/iprt/http.h
===================================================================
--- /trunk/include/iprt/http.h	(revision 58198)
+++ /trunk/include/iprt/http.h	(revision 58199)
@@ -73,5 +73,5 @@
 
 /**
- * Perform a simple blocking HTTP request.
+ * Perform a simple blocking HTTP GET request.
  *
  * This is a just a convenient wrapper around RTHttpGetBinary that returns a
@@ -82,5 +82,5 @@
  * @param   hHttp           The HTTP client instance.
  * @param   pszUrl          URL.
- * @param   ppszNotUtf8     Where to return the poitner to the HTTP response.
+ * @param   ppszNotUtf8     Where to return the pointer to the HTTP response.
  *                          The string is of course zero terminated.  Use
  *                          RTHttpFreeReponseText to free.
@@ -102,4 +102,33 @@
 
 /**
+ * Perform a simple blocking HTTP HEAD request.
+ *
+ * This is a just a convenient wrapper around RTHttpGetBinary that returns a
+ * different type and sheds a parameter.
+ *
+ * @returns iprt status code.
+ *
+ * @param   hHttp           The HTTP client instance.
+ * @param   pszUrl          URL.
+ * @param   ppszNotUtf8     Where to return the pointer to the HTTP response.
+ *                          The string is of course zero terminated.  Use
+ *                          RTHttpFreeReponseText to free.
+ *
+ * @remarks BIG FAT WARNING!
+ *
+ *          This function does not guarantee the that returned string is valid UTF-8 or
+ *          any other kind of text encoding!
+ *
+ *          The caller must determine and validate the string encoding _before_
+ *          passing it along to functions that expect UTF-8!
+ *
+ *          Also, this function does not guarantee that the returned string
+ *          doesn't have embedded zeros and provides the caller no way of
+ *          finding out!  If you are worried about the response from the HTTPD
+ *          containing embedded zero's, use RTHttpGetHeaderBinary instead.
+ */
+RTR3DECL(int) RTHttpGetHeaderText(RTHTTP hHttp, const char *pszUrl, char **ppszNotUtf8);
+
+/**
  * Frees memory returned by RTHttpGetText.
  *
@@ -109,5 +138,5 @@
 
 /**
- * Perform a simple blocking HTTP request.
+ * Perform a simple blocking HTTP GET request.
  *
  * @returns iprt status code.
@@ -120,4 +149,17 @@
  */
 RTR3DECL(int) RTHttpGetBinary(RTHTTP hHttp, const char *pszUrl, void **ppvResponse, size_t *pcb);
+
+/**
+ * Perform a simple blocking HTTP HEAD request.
+ *
+ * @returns iprt status code.
+ *
+ * @param   hHttp           The HTTP client instance.
+ * @param   pszUrl          The URL.
+ * @param   ppvResponse     Where to store the HTTP response data.  Use
+ *                          RTHttpFreeResponse to free.
+ * @param   pcb             Size of the returned buffer.
+ */
+RTR3DECL(int) RTHttpGetHeaderBinary(RTHTTP hHttp, const char *pszUrl, void **ppvResponse, size_t *pcb);
 
 /**
Index: /trunk/src/VBox/Runtime/generic/http-curl.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/http-curl.cpp	(revision 58198)
+++ /trunk/src/VBox/Runtime/generic/http-curl.cpp	(revision 58199)
@@ -2210,4 +2210,11 @@
     }
 
+    /*
+     * Use GET by default.
+     */
+    rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_NOBODY, 0L);
+    if (CURL_FAILURE(rcCurl))
+        return VERR_HTTP_CURL_ERROR;
+
     return VINF_SUCCESS;
 }
@@ -2281,4 +2288,5 @@
  * @param   hHttp               The HTTP/HTTPS client instance.
  * @param   pszUrl              The URL.
+ * @param   fNoBody             Set to suppress the body.
  * @param   ppvResponse         Where to return the pointer to the allocated
  *                              response data (RTMemFree).  There will always be
@@ -2290,5 +2298,5 @@
  *          threads, because that will probably blow up!
  */
-static int rtHttpGetToMem(RTHTTP hHttp, const char *pszUrl, uint8_t **ppvResponse, size_t *pcb)
+static int rtHttpGetToMem(RTHTTP hHttp, const char *pszUrl, bool fNoBody, uint8_t **ppvResponse, size_t *pcb)
 {
     PRTHTTPINTERNAL pThis = hHttp;
@@ -2322,4 +2330,7 @@
         if (!CURL_FAILURE(rcCurl))
             rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_WRITEDATA, (void *)pThis);
+        if (   fNoBody
+            && !CURL_FAILURE(rcCurl))
+            rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_NOBODY, 1L);
         if (!CURL_FAILURE(rcCurl))
         {
@@ -2355,5 +2366,5 @@
     uint8_t *pv;
     size_t   cb;
-    int rc = rtHttpGetToMem(hHttp, pszUrl, &pv, &cb);
+    int rc = rtHttpGetToMem(hHttp, pszUrl, false /*fNoBody*/, &pv, &cb);
     if (RT_SUCCESS(rc))
     {
@@ -2369,4 +2380,24 @@
 
 
+RTR3DECL(int) RTHttpGetHeaderText(RTHTTP hHttp, const char *pszUrl, char **ppszNotUtf8)
+{
+    Log(("RTHttpGetText: hHttp=%p pszUrl=%s\n", hHttp, pszUrl));
+    uint8_t *pv;
+    size_t   cb;
+    int rc = rtHttpGetToMem(hHttp, pszUrl, true /*fNoBody*/, &pv, &cb);
+    if (RT_SUCCESS(rc))
+    {
+        if (pv) /* paranoia */
+            *ppszNotUtf8 = (char *)pv;
+        else
+            *ppszNotUtf8 = (char *)RTMemDup("", 1);
+    }
+    else
+        *ppszNotUtf8 = NULL;
+    return rc;
+
+}
+
+
 RTR3DECL(void) RTHttpFreeResponseText(char *pszNotUtf8)
 {
@@ -2378,5 +2409,12 @@
 {
     Log(("RTHttpGetBinary: hHttp=%p pszUrl=%s\n", hHttp, pszUrl));
-    return rtHttpGetToMem(hHttp, pszUrl, (uint8_t **)ppvResponse, pcb);
+    return rtHttpGetToMem(hHttp, pszUrl, false /*fNoBody*/, (uint8_t **)ppvResponse, pcb);
+}
+
+
+RTR3DECL(int) RTHttpGetHeaderBinary(RTHTTP hHttp, const char *pszUrl, void **ppvResponse, size_t *pcb)
+{
+    Log(("RTHttpGetBinary: hHttp=%p pszUrl=%s\n", hHttp, pszUrl));
+    return rtHttpGetToMem(hHttp, pszUrl, true /*fNoBody*/, (uint8_t **)ppvResponse, pcb);
 }
 
