Change buffer sizes to support GR-PEACH
Dependents: GR-PEACH_Azure_Speech
Fork of HTTPClient-SSL by
Diff: HTTPClient.cpp
- Revision:
- 50:7fbf8ef951f2
- Parent:
- 46:369da903fca9
--- a/HTTPClient.cpp Thu Jun 25 13:55:25 2015 +0000 +++ b/HTTPClient.cpp Sat Nov 07 12:20:31 2015 +0000 @@ -18,8 +18,8 @@ */ // DMA: Added tunable to adapt size of larger input URLs -#define MAX_URL_HOSTNAME_LENGTH 128 -#define MAX_URL_PATH_LENGTH 128 +#define MAX_URL_HOSTNAME_LENGTH 512 +#define MAX_URL_PATH_LENGTH 512 //Debug is disabled by default #if 0 @@ -45,6 +45,8 @@ #define MIN(x,y) (((x)<(y))?(x):(y)) #define MAX(x,y) (((x)>(y))?(x):(y)) +#include "mbed.h" +#include <string> #include <cstring> #include <settings.h> @@ -55,8 +57,10 @@ #include "HTTPClient.h" static TCPSocketConnection* m_sock; -#define CHUNK_SIZE 256 -#define SEND_BUF_SIZE 1024 +//#define CHUNK_SIZE 256 +//#define SEND_BUF_SIZE 1024 +#define CHUNK_SIZE (1024*8) +#define SEND_BUF_SIZE (1024*4) static char send_buf[SEND_BUF_SIZE] ; static char *send_buf_p = NULL; @@ -425,6 +429,7 @@ return HTTP_CONN; } + wait(0.3) ; //Send all headers //Send default headers