• Program is working now, files attached
    Thanks for the suggestions.
    Checking the length in the header against the length of the data collected in the on('data') event and the proceeding to process the message and reply made it work.

    var reqq;
    var ress;
    function doPost(req,res){
    var length;
      length=req.headers["Content-Length"];
      reqq=req;ress=res;
      req.on("data", function(d) {pdata+=d;if(pdata.length==length)doPost­1(reqq,ress);});
      req.on('close',"console.log(\"Closed\",p­data);");
    }
    

    2 Attachments

About