Sockets and Post

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
toddgeist
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 21
Joined: Sat Apr 15, 2006 9:12 pm

Sockets and Post

Post by toddgeist » Wed Nov 05, 2014 5:09 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9833
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sockets and Post

Post by FourthWorld » Wed Nov 05, 2014 5:33 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

toddgeist
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 21
Joined: Sat Apr 15, 2006 9:12 pm

Re: Sockets and Post

Post by toddgeist » Wed Nov 05, 2014 5:59 pm

Thats worth trying. Thanks

Todd

toddgeist
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 21
Joined: Sat Apr 15, 2006 9:12 pm

Re: Sockets and Post

Post by toddgeist » Wed Nov 05, 2014 7:27 pm

Ok I got it figured out. It's all there. Just need to parse it out. :-)

Todd

Post Reply

Return to “Internet”