File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -277,20 +277,20 @@ uint16_t wifi_HttpGet(char *url) {
277277 }
278278}
279279
280- const char httpHeaderTpl [] = "HTTP/1.0 %d %s\n"
281- "Server: OpenBttn\n"
282- "Access-Control-Allow-Origin: *\n"
283- "Content-Type: %s\n"
284- "%s" // "Content-Encoding: %s\n"
285- "Content-Length: %d\n \n" ;
280+ const char httpHeaderTpl [] = "HTTP/1.0 %d %s\r\ n"
281+ "Server: OpenBttn\r\ n"
282+ "Access-Control-Allow-Origin: *\r\ n"
283+ "Content-Type: %s\r\ n"
284+ "%s" // "Content-Encoding: %s\r\ n"
285+ "Content-Length: %d\r\n\r \n" ;
286286
287287int wifi_CreateHttpHeader (char * dest , int len , int status ,
288288 const char * statusText , const char * contentType ,
289289 const char * contentEnc , uint16_t contentLength ) {
290290 char contentEncoding [HTTP_HEADER_ENCODING_LENGTH + 1 ] = {0 };
291291 if (contentEnc ) {
292292 int s = snprintf (contentEncoding , HTTP_HEADER_ENCODING_LENGTH ,
293- "Content-Encoding: %s\n" , contentEnc );
293+ "Content-Encoding: %s\r\ n" , contentEnc );
294294 if (s < 0 ) {
295295 return s ;
296296 }
Original file line number Diff line number Diff line change 6464
6565#define HTTP_HEADER_LENGTH 180
6666#define HTTP_HEADER_ENCODING_LENGTH \
67- (18 + 8) // Longest encodings are "compress" and "identity" (8 chars).
67+ (18 + 8 + 2 ) // Longest encodings are "compress" and "identity" (8 chars).
6868
6969typedef uint16_t WifiState ;
7070
You can’t perform that action at this time.
0 commit comments