- // At this level we're may verify that we got everything and process DATA
- if (postHandle->len != contentlen) {
- errMessage = jsonNewMessage(AFB_FATAL, "Post Data Incomplete UID=%d Len %d != %d", postHandle->uid, contentlen, postHandle->len);
- goto ExitOnError;
- }
- // Before processing data, make sure buffer string is properly ended
- postHandle->privatebuf[postHandle->len] = '\0';
- postRequest.data = postHandle->privatebuf;
- request->post = &postRequest;
+ param = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_CONTENT_LENGTH);
+ if (param)
+ sscanf(param, "%i", &contentlen);