{"action":"opened","issue":{"url":"https://api.github.com/repos/cesanta/mongoose/issues/709","repository_url":"https://api.github.com/repos/cesanta/mongoose","labels_url":"https://api.github.com/repos/cesanta/mongoose/issues/709/labels{/name}","comments_url":"https://api.github.com/repos/cesanta/mongoose/issues/709/comments","events_url":"https://api.github.com/repos/cesanta/mongoose/issues/709/events","html_url":"https://github.com/cesanta/mongoose/issues/709","id":180483144,"number":709,"title":"Multiple file upload: incorrect results in some cases","user":{"login":"hkoch78","id":20473406,"avatar_url":"https://avatars.githubusercontent.com/u/20473406?v=3","gravatar_id":"","url":"https://api.github.com/users/hkoch78","html_url":"https://github.com/hkoch78","followers_url":"https://api.github.com/users/hkoch78/followers","following_url":"https://api.github.com/users/hkoch78/following{/other_user}","gists_url":"https://api.github.com/users/hkoch78/gists{/gist_id}","starred_url":"https://api.github.com/users/hkoch78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkoch78/subscriptions","organizations_url":"https://api.github.com/users/hkoch78/orgs","repos_url":"https://api.github.com/users/hkoch78/repos","events_url":"https://api.github.com/users/hkoch78/events{/privacy}","received_events_url":"https://api.github.com/users/hkoch78/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-01T22:12:30Z","updated_at":"2016-10-01T22:12:30Z","closed_at":null,"body":"Running Mongoose 6.5 in a C application, I've got different results for multiple file uploads (via \"-DMG_ENABLE_HTTP_STREAMING_MULTIPART\"). The second file of a file upload set is interpreted of size 0, which is wrong. Such a HTTP request is as follows (in this example, file \"smime.p7s\" is empty; the file \"3633bytes\" is 3633 bytes, generated from /dev/zero, so containing 3633 NULL-bytes):\r\n`POST / HTTP/1.1\r\nmime-version: 1.0\r\nrecipient-address: http://172.16.223.1:8080\r\nsubject: This is a subject\r\nconnection: close, TE\r\ndate: Sat, 01 Oct 2016 04:16:39 CEST\r\ncontent-type:  multipart/signed; protocol=\"application/pkcs7-signature\"; micalg=sha1;  boundary=\"----=_Part_136_2012570295.1475288199479\"\r\ncontent-disposition: attachment; filename=\"smime.p7m\"\r\nhost: 172.16.223.1:8080\r\nContent-Length: 5945\r\nExpect: 100-continue\r\n\r\n\r\n------=_Part_136_2012570295.1475288199479\r\nContent-Type: application/EDI-Consent\r\nContent-Transfer-Encoding: binary\r\nContent-Disposition: attachment; filename=3633bytes\r\n\r\n\r\n------=_Part_136_2012570295.1475288199479\r\nContent-Type: application/pkcs7-signature; name=smime.p7s; smime-type=signed-data\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename=\"smime.p7s\"\r\nContent-Description: S/MIME Cryptographic Signature\r\n\r\nMIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIAwggLQMIIC\r\nOQIEQ4798zANBgkqhkiG9w0BAQUFADCBrjEmMCQGCSqGSIb3DQEJARYXcm9zZXR0YW5ldEBtZW5k\r\nZWxzb24uZGUxCzAJBgNVBAYTAkRFMQ8wDQYDVQQIEwZCZXJsaW4xDzANBgNVBAcTBkJlcmxpbjEi\r\nMCAGA1UEChMZbWVuZGVsc29uLWUtY29tbWVyY2UgR21iSDEiMCAGA1UECxMZbWVuZGVsc29uLWUt\r\nY29tbWVyY2UgR21iSDENMAsGA1UEAxMEbWVuZDAeFw0wNTEyMDExMzQzMTVaFw0xOTA4MTAxMzQz\r\nMTVaMIGuMSYwJAYJKoZIhvcNAQkBFhdyb3NldHRhbmV0QG1lbmRlbHNvbi5kZTELMAkGA1UEBhMC\r\nREUxDzANBgNVBAgTBkJlcmxpbjEPMA0GA1UEBxMGQmVybGluMSIwIAYDVQQKExltZW5kZWxzb24t\r\nZS1jb21tZXJjZSBHbWJIMSIwIAYDVQQLExltZW5kZWxzb24tZS1jb21tZXJjZSBHbWJIMQ0wCwYD\r\nVQQDEwRtZW5kMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVBiuTRlvgyx0BuTMV8unaZk6D\r\n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E1oG5SeOEsYdf3PsJ5GGG9IlFJSnll9DlheEhk5NsMVxL8RlKjXAus\r\nH2bb2TzMpUGh3GdpAAAAAAAA\r\n------=_Part_136_2012570295.1475288199479--\r\n`\r\nInterestingly, MG_EV_HTTP_PART_BEGIN is followed by MG_EV_HTTP_PART_END (missing any MG_EV_HTTP_PART_DATA)."}}
{"actor":{"display_login":"hkoch78"}}