A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: tcp/http/http.c
- Revision:
- 73:43e3d7fb3d60
- Parent:
- 71:736a5747ade1
- Child:
- 75:603b10404183
--- a/tcp/http/http.c Mon Oct 22 10:24:58 2018 +0000 +++ b/tcp/http/http.c Tue Oct 23 06:46:50 2018 +0000 @@ -11,20 +11,20 @@ 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 -void HttpHandleRequest(int* pSize, char* pRequestStream, int positionInRequestStream, int* pToDo) +void HttpHandleRequest(int size, char* pRequestStream, int positionInRequestStream, int* pToDo) { if (HttpTrace) { - LogF("HTTP <<< %d (%d)\r\n", *pSize, positionInRequestStream); + LogF("HTTP <<< %d (%d)\r\n", size, positionInRequestStream); } //Handle request for the first packet of data received but leave todo the same after that. - if (*pSize) + if (size) { char* pMethod; char* pPath; char* pQuery; char* pLastModified; - HttpReadRequest(pRequestStream, *pSize, &pMethod, &pPath, &pQuery, &pLastModified); + HttpReadRequest(pRequestStream, size, &pMethod, &pPath, &pQuery, &pLastModified); *pToDo = HttpRequestFunction(pPath, pLastModified, pQuery); }