Change buffer sizes to support GR-PEACH

Dependencies:   CyaSSL

Dependents:   GR-PEACH_Azure_Speech

Fork of HTTPClient-SSL by MultiTech

Revision:
50:7fbf8ef951f2
Parent:
29:2d96cc752d19
--- a/data/HTTPText.cpp	Thu Jun 25 13:55:25 2015 +0000
+++ b/data/HTTPText.cpp	Sat Nov 07 12:20:31 2015 +0000
@@ -17,6 +17,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include "mbed.h"
 #include "HTTPText.h"
 
 #include <cstring>
@@ -36,7 +37,7 @@
 
 HTTPText::HTTPText(char* str, size_t size) : m_str(str), m_size(size), m_pos(0)
 {
-
+    strcpy(m_datatype, "plan/text");
 }
 
 //IHTTPDataIn
@@ -55,7 +56,8 @@
 
 /*virtual*/ int HTTPText::getDataType(char* type, size_t maxTypeLen) //Internet media type for Content-Type header
 {
-  strncpy(type, "plain/text", maxTypeLen-1);
+  //strncpy(type, "plain/text", maxTypeLen-1);
+  strncpy(type, m_datatype, maxTypeLen-1);
   type[maxTypeLen-1] = '\0';
   return OK;
 }
@@ -87,7 +89,7 @@
 
 /*virtual*/ void HTTPText::setDataType(const char* type) //Internet media type from Content-Type header
 {
-
+    strcpy(m_datatype, type);
 }
 
 /*virtual*/ void HTTPText::setIsChunked(bool chunked) //From Transfer-Encoding header