Whenever I receive TCP messages using something like this:
local socket=require "socket"
local sv=socket.bind("*",1337)
function love.update(dt)
local s=sv:accept()
while true do
local s,e=s:receive()
print(e or s)
end
end
It works perfectly fine with \r\n
spaced http headers, but when I try to http POST to it, I get the headers fine but not the data, witch is after and empty line (\r\n\r\n)
it does the same thing when i use this as a client:
s.socket_write(h,"test1\r\ntest2\r\n\r\ntest3") -- (not luasocket)
I see test1 and test2
I've tried messing around with the setOption function but it didnt work
Is there any way to receive the data?