Hello,
I have this small project, and right now I have a small web server, using tcp sockets and binding on port 80. What I need to do is just have it listen for POSTs from another website. So far, I only got it to work internally, when the POST comes from the same computer the server is hosted on. When I get a post from the host machine, the buffer looks like this:
Code:POST / HTTP/1.1 User-Agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.51 Host: 192.168.2.9 Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Language: en-US,en;q=0.9 Accept-Encoding: gzip, deflate Connection: Keep-Alive Content-Length: 25 Content-Type: application/x-www-form-urlencoded Username=Test&Password=Hi
But when its from a remote server, it looks like this:
Code:POST / HTTP/1.1 User-Agent: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.168 Version/11.51 Host: -------- Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Language: en-US,en;q=0.9 Accept-Encoding: gzip, deflate Connection: Keep-Alive Content-Length: 23 Content-Type: application/x-www-form-urlencoded
And using just the basic form:
Code:<form action="http://192.168.2.9/" METHOD="POST"> <input type="text" name="Username"> <input type="text" name="Password"> <input type="submit"> </form>
As you can see the data isn't there. Idk if this is an encoding problem or..idk I'm lost.
Thanks.


Reply With Quote