Hi All , I am working to create a HTTP server using net module of NODE JS. I am facing an issue when content type is multipart/form-data
With content type as multipart/form-data and uploading mulitple files , request is coming in chunks . Basically data event on socket is gettting fired twice. First time when data event is getting fired , it contains request with just header contents and in second attempt it has only body content
function in which data event is handled ——> lib -> server.js -> dataEventHandler
testing of server code - test->index.js
Currently I’m setting a timeout for 1second before proceeding further to process request. In that 1second , appending all the variuos requests received from data events into an array . But its kind of blocking approach . Can someone help me in the correct approach on this ?