Hi Mark,
I have used the simulator as you suggested and it is rejecting the data. basically, when it gets to the line( around 750) in http.c ;
if (EXPECTING_DATA & header_search_state.ucState)
It fails because header_search_state.ucState is 0x67 and EXPECTING_DATA is 0x02
By looking at the state machine and breaking on the switch statement, the states appear to go;
switch state (ucEvent header_search_state.ucState
-------------------------------------------------------------------------
BOUNDARY_FOUND 0x03
CONTENT_LENGTH_FOUND 0x41
FIRST_BOUNDARY_FOUND 0x45
CONTENT_TYPE_FOUND 0x65
FIRST_BOUNDARY_FOUND 0x67
-------------------------------------------------------------------------
fnHandleWeb(CAN_POST_BEGIN, 0, http_session) is then called and returns 0
The line if (EXPECTING_DATA & header_search_state.ucState)
is then executed. It is false so the line
http_session->ucState = HTTP_STATE_DUMPING_DATA;
is executed and the file is not stored.
Does the above give an insight into why it is failing?
Cheers,
Peter.