Andrew Boyson / net

Dependents:   oldheating gps motorhome heating

Revision:
155:22f249751106
Parent:
154:ba9879b19d9f
Child:
156:be12b8fd5b21
--- a/tcp/http/httpshim/httpshim.c	Wed Jul 31 15:10:53 2019 +0000
+++ b/tcp/http/httpshim/httpshim.c	Tue Aug 20 14:49:00 2019 +0000
@@ -13,8 +13,8 @@
 
 void HttpShimRequest(int size, char* pRequestStream, uint32_t positionInRequestStream, char* pWebState, char* pTlsState, bool secure)
 {
-    if (secure) TlsRequest         (pTlsState, pWebState, size, pRequestStream, positionInRequestStream);
-    else        HttpRequestFunction(           pWebState, size, pRequestStream, positionInRequestStream);
+    if (secure) TlsRequest         (pTlsState, pWebState, size, (uint8_t*)pRequestStream, positionInRequestStream);
+    else        HttpRequestFunction(           pWebState, size,           pRequestStream, positionInRequestStream);
 }
 
 static bool tlsRequired;
@@ -24,7 +24,7 @@
     if (tlsRequired) return TlsPoll         (pTlsState, pWebState, clientFinished);
     else             return HttpPollFunction(           pWebState, clientFinished);
 }
-void HttpShimAddChar  (char c)
+void HttpShimAddChar(char c)
 {
     if (tlsRequired) TlsAddChar(c);
     else          TcpBufAddChar(c);
@@ -36,5 +36,6 @@
 }
 bool HttpShimGetTrace()
 {
-    return HttpTrace;
+    if (tlsRequired) return  TlsTrace;
+    else             return HttpTrace;
 }
\ No newline at end of file