Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: tcp/http/http.cpp
- Revision:
- 55:e64b8b47a2b6
- Parent:
- 54:84ef2b29cf7e
--- a/tcp/http/http.cpp Mon Nov 13 08:06:55 2017 +0000
+++ b/tcp/http/http.cpp Mon Nov 13 21:46:31 2017 +0000
@@ -10,12 +10,11 @@
void (*HttpReplyFunction )(int todo); //Plumb into this from your html server
int (*HttpRequestFunction)(char *pPath, char *pLastModified, char *pQuery); //Plumb into this from your html server
-int HttpHandleRequest(void (*traceback)(void), int* pSize, char* pRequestStream, int positionInRequestStream, char* pReplyStream, int positionInReplyStream, uint16_t mss, int* pToDo)
+int HttpHandleRequest(int* pSize, char* pRequestStream, int positionInRequestStream, char* pReplyStream, int positionInReplyStream, uint16_t mss, int* pToDo)
{
if (HttpTrace)
{
- if (NetTraceNewLine) Log("\r\n");
- LogTimeF("HTTP packet received starting at %d length %d bytes\r\n", positionInRequestStream, *pSize);
+ LogF("HTTP <<< %d (%d)\r\n", *pSize, positionInRequestStream);
}
//Handle request for the first packet of data received but leave todo the same after that.
if (*pSize)
@@ -32,6 +31,12 @@
TcpBufStart(positionInReplyStream, mss, pReplyStream);
HttpReplyFunction(*pToDo);
*pSize = TcpBufLength();
+
+ if (HttpTrace)
+ {
+ LogF("HTTP >>> %d (%d)\r\n", *pSize, positionInReplyStream);
+ }
+
return UNICAST;
}
\ No newline at end of file