Fork with custom headers and basic auth.

Dependents:   MbedSmartRest

Fork of HTTPClient by Kazushi Mukaiyama

Revision:
21:66f1c10a5e9a
Parent:
20:cb2e5cd4e29b
Child:
22:967c00d70d95
--- a/HTTPClient.cpp	Mon Jan 27 08:44:42 2014 +0000
+++ b/HTTPClient.cpp	Thu Jan 30 11:47:09 2014 +0000
@@ -175,8 +175,8 @@
   }
   
   // send authorization
-  if ((!m_basicAuthUser) && (!m_basicAuthPassword)) {
-    strcpy(buf, "Authorization: ");
+  if ((m_basicAuthUser != NULL) && (m_basicAuthPassword != NULL)) {
+    strcpy(buf, "Authorization: Basic ");
     createauth(m_basicAuthUser, m_basicAuthPassword, buf+strlen(buf), sizeof(buf)-strlen(buf));
     strcat(buf, "\r\n");