Page 1 of 1

Sockets and Post

Posted: Wed Nov 05, 2014 5:09 pm
by toddgeist
Hello,
I am working on HTTP Server in LiveCode.
https://github.com/toddgeist/lchttpd

I don't really need to support POST, but I would like to try. However, when I post something to the open Socket, I don't see any of the POST body. I am curious about why that is. Does anyone have any clues? Any examples that support Post?

Thanks

Todd

Re: Sockets and Post

Posted: Wed Nov 05, 2014 5:33 pm
by FourthWorld
I haven't worked with POST from within mchttd before so I don't have a ready solution, but in the old CGI engine we got POST data by reading from stdIn until EOF after the original request launched the CGI app. So this is just a guess (an ignorant one, given that I haven't read the RFC for POST), I'm wondering if a subsequent read on the socket is all that's needed.

Re: Sockets and Post

Posted: Wed Nov 05, 2014 5:59 pm
by toddgeist
Thats worth trying. Thanks

Todd

Re: Sockets and Post

Posted: Wed Nov 05, 2014 7:27 pm
by toddgeist
Ok I got it figured out. It's all there. Just need to parse it out. :-)

Todd