diff --git a/docs/curl.1 b/docs/curl.1
index d6fb9aa..d5f63d9 100644
--- a/docs/curl.1
+++ b/docs/curl.1
@@ -592,7 +592,9 @@ header will be used instead of the internal one. This allows you to make even
 trickier stuff than curl would normally do. You should not replace internally
 set headers without knowing perfectly well what you're doing. Remove an
 internal header by giving a replacement without content on the right side of
-the colon, as in: -H \&"Host:".
+the colon, as in: -H \&"Host:". If you send the custom header with no-value then
+its header must  terminate by semicolon.  in: -H "X-Custom-Header;"  is  to send
+"X-Custom-Header:".
 
 curl will make sure that each header you add/replace is sent with the proper
 end-of-line marker, you should thus \fBnot\fP add that as a part of the header
diff --git a/lib/http.c b/lib/http.c
index ef3953e..161b18b 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1519,6 +1519,7 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
 {
   char *ptr;
   struct curl_slist *headers=conn->data->set.headers;
+  CURLcode result;
 
   while(headers) {
     ptr = strchr(headers->data, ':');
@@ -1552,13 +1553,36 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn,
                 checkprefix("Connection", headers->data))
           ;
         else {
-          CURLcode result = Curl_add_bufferf(req_buffer, "%s\r\n",
+          result = Curl_add_bufferf(req_buffer, "%s\r\n",
                                              headers->data);
           if(result)
             return result;
         }
       }
     }
+    else {
+      bool i = TRUE;
+      ptr = headers->data;
+      while(*ptr) {
+        if (ISSPACE(*ptr++)) {
+          i = FALSE;
+          break;
+        }
+      }
+      if(i) {
+        ptr = strchr(headers->data, ';');
+        /* send non-value custom header if terminated by semicolon */
+        if (ptr) {
+          if(*(ptr + 1) == '\0') {
+            *ptr = ':';
+            result = Curl_add_bufferf(req_buffer, "%s\r\n",
+                                             headers->data);
+            if(result)
+              return result;
+          }
+        }
+      }
+    }
     headers = headers->next;
   }
   return CURLE_OK;
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index ea92cf9..acc2a19 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -47,7 +47,7 @@ test542 test543 test544 test545 test546 test547 test548 test549 test550	\
 test551 test552 test553 test554 test555 test556 test557 test560 test561	\
 test562 test563 test564 test565 test566 test567 test568 test569 test570	\
 test571 test572 test573 test574 test575 test576 test578 test579 test580	\
-test581 test582 test583 test584 test585 test586 \
+test581 test582 test583 test584 test585 test586 test587 \
 test600 test601 test602 test603 test604	\
 test605 test606 test607 test608 test609 test610 test611 test612 test613	\
 test614 test615 test616 test617 test618 test619 test620 test621 test622	\
diff --git a/tests/data/test587 b/tests/data/test587
new file mode 100644
index 0000000..9e6b093
--- /dev/null
+++ b/tests/data/test587
@@ -0,0 +1,41 @@
+<testcase>
+#
+# Server-side
+<reply>
+<data mode="text">
+HTTP/1.1 200 OK
+Content-Length: 16
+
+</data>
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+# tool is what to use instead of 'curl'
+<tool>
+lib587
+</tool>
+
+ <name>
+HTTP send non-value custom header. curl option:'x-custom-header;' -> request:'x-custom-header:'
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/587
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+POST /587 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+X-Non-value-Custom-Header:
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 98e33c1..095fa06 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -15,7 +15,7 @@ noinst_PROGRAMS = chkhostname \
   lib579 lib529 lib530 lib532 lib533 lib536 lib537 lib540 lib541 lib542	\
   lib543 lib544 lib545 lib547 lib548 lib549 lib552 lib553 lib554 lib555	\
   lib556 lib539 lib557 lib560 lib562 lib564 lib565 lib566 lib567 lib568	\
-  lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585
+  lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585 lib587
 
 chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
 chkhostname_LDADD = @CURL_NETWORK_LIBS@
@@ -164,5 +164,7 @@ lib582_SOURCES = lib582.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
 
 lib583_SOURCES = lib583.c $(SUPPORTFILES)
 
+lib587_SOURCES = lib587.c $(SUPPORTFILES)
+
 lib585_SOURCES = lib500.c $(SUPPORTFILES)
 lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
diff --git a/tests/libtest/lib587.c b/tests/libtest/lib587.c
new file mode 100644
index 0000000..1ac5510
--- /dev/null
+++ b/tests/libtest/lib587.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#include "test.h"
+
+#include "memdebug.h"
+
+int test(char *URL)
+{
+  CURL *curl;
+  CURLcode res=CURLE_OK;
+  struct curl_slist *slist = NULL;
+
+  if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
+    fprintf(stderr, "curl_global_init() failed\n");
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  if ((curl = curl_easy_init()) == NULL) {
+    fprintf(stderr, "curl_easy_init() failed\n");
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  slist = curl_slist_append(slist, "X-Non-value-Custom-Header;");
+  if (slist == NULL) {
+    fprintf(stderr, "curl_slist_append() failed\n");
+    curl_easy_cleanup(curl);
+    curl_global_cleanup();
+    return TEST_ERR_MAJOR_BAD;
+  }
+
+  test_setopt(curl, CURLOPT_NOBODY, 1L);  /* enable NOBODY */
+  test_setopt(curl, CURLOPT_HEADER, 1L);  /* enable HEADER */
+  test_setopt(curl, CURLOPT_URL, URL);    /* specify target */
+  test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+
+  test_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
+  test_setopt(curl, CURLOPT_INFILESIZE, 0);
+
+  /* send non-value custiom header */
+  test_setopt(curl, CURLOPT_HTTPHEADER, slist);
+
+  /* Now, we should be making a zero byte POST request */
+  res = curl_easy_perform(curl);
+
+test_cleanup:
+
+  /* always cleanup */
+  curl_easy_cleanup(curl);
+  curl_global_cleanup();
+
+  return (int)res;
+}
