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
Basically issue is similar to this stack overflow 
https://stackoverflow.com/questions/40591455/nodejs-tcp-socket-sends-multiple-data-event
 
. I am using mac OSX
My Code base for same can be found at 
https://github.com/chandrajob365/Node-net-Server/tree/b90649e3fb9d4b2a32f6aa4e1e1e32f0e94437f0
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 ?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/2f0905fd-b48e-49dd-90b4-87f339c0e0fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to