Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 recive post request from client(browser) python sockets
#1
i am writing a simple webserver without using any libraries in python i am trying to recive a post request from the browser

HTML FILE

Output:
<form method="POST"> <input type="text" /> <input type="submit" /> </form>
python file

request = client_connection.recv(1024)
print request
so if i type HELLO WORLD! in the input box and press submit i get this response

Output:
POST / HTTP/1.1 Host: 127.0.0.1:8888 Connection: keep-alive Content-Length: 0 Cache-Control: max-age=0 Origin: http://127.0.0.1:8888 Upgrade-Insecure-Requests: 1 Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: http://127.0.0.1:8888/ Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Cookie: PHPSESSID=k2ae5h3v8esmiij1eu1mff7ju6; FAea2c25b156a4d770f5eb3b4a876d1c4a=n2nu253hf3bq8oduq4chvuk0i3
i can not find the word HELLO WORLD! anywhere

how can i read the post request in python

Stackoverflow-version
buran wrote Dec-13-2018, 08:21 AM:
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
Quote
#2
the name tag was missing i fixed it
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 196 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  Script Conversion 2.7 to 3 (sockets) Pumpernickel 1 260 Apr-10-2019, 04:26 PM
Last Post: Pumpernickel
  How to combine data taken from server between client and GUI? bescf 9 514 Apr-02-2019, 11:48 AM
Last Post: bescf
  Graphql subscriptions client Edoar 0 209 Mar-11-2019, 04:13 PM
Last Post: Edoar
  TCP/IP client script help Rehan11 2 499 Jan-15-2019, 06:48 AM
Last Post: Rehan11
  socket programming (browser) kunz 8 827 Dec-18-2018, 10:13 AM
Last Post: siripriya
  Scapy, creating response for GET request. SyRex1013 4 632 Dec-11-2018, 07:39 AM
Last Post: SyRex1013
  What sort of things can I write to learn about sockets marienbad 2 537 Oct-16-2018, 04:02 PM
Last Post: buran
  GET Request and JSON response montyonthebonty 9 1,076 Sep-27-2018, 07:28 AM
Last Post: buran
  unix domain sockets Skaperen 8 1,056 Sep-02-2018, 07:02 PM
Last Post: Skaperen

Forum Jump:


Users browsing this thread: 1 Guest(s)