Questions tagged [basehttprequesthandler]

74 questions
0
votes
1 answer

python3 HTTPServer/BaseHTTPRequestHandler output stream issue

I have faced an issue with a built-in python3 http.server module. Specifically, wfile.write() method in BaseHTTPRequestHandler class. I'm trying to send an html form pre-defined as a string to a client with a GET request. The output stream to the…
0
votes
0 answers

Send a flag from a HTTP Server to Client python

I have a basic HTTP server-client written in Python wherein the server has different modules (campaigns) to run. I want the client to interact with the server only when a certain campaign is up. I was thinking I could maybe create a flag whose value…
Nomi
  • 11
  • 2
0
votes
1 answer

Python3 passing a queue to a multi-threaded HTTP server class

I will be the first to admit that I am still relatively new to Python. This board has been a lot of help... I am working on a project where I am using a multi-threaded HTTP server and i need to send a signal back to the main loop. I am trying to…
Ken S
  • 1
  • 2
0
votes
1 answer

BaseHTTPServer POST request - Connection Reset

I am building a simple Python tool that takes GPS coordinates from an external receiver via COM port and translates it to a JSON string like is returned by Google Geolocation API. The purpose is to replace the Google Geolocation provider URL in…
0
votes
1 answer

Add https redirect in Python3 Mockserver

we have this mockserver that is now serving https:// requests, and if we remove the ssl wrapping (ssl.wrap_socket(myServer.socket,keyfile='key.pem',certfile= 'cert.pem', server_side=True), the server only serves http:// requests. Is there any way…
nhrcpt
  • 862
  • 3
  • 21
  • 51
0
votes
1 answer

I do not know how to check the results. (BaseHTTPRequestHandler)

from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler class aaa(BaseHTTPRequestHandler): def do_GET(self): self.wfile.write("Hello World") if __name__ == "__main__": server = HTTPServer(("", 8888), aaa) …
신재현
  • 1
  • 1
0
votes
1 answer

How to measure RTT using python httplib, Httpserver

I made an HTTP proxy using the httplib and BaseHTTPServer, Now I want to know if there is way that I can calculate the RTT to each server. I don't want to use ping method because I want to calculate the RTT for each object's server passing through…
0
votes
1 answer

Python: Retrieve POST response from BaseHTTPRequestHandler

I'm trying to retrieve the response after a POST request with Python using a BaseHTTPRequestHandler. To simplify the problem, I have two PHP files. jquery_send.php
sysseon
  • 177
  • 3
  • 14
0
votes
1 answer

BaseHTTPServer only Serves Webpage Once

I'm trying to figure out how to set up a basic web server in Python, but I'm having a lot of difficulty. My main issue is that I am only able to get my server to serve the webpage once. The html displays a message in the browser and the Javascript…
Andrew Kline
  • 115
  • 1
  • 6
0
votes
1 answer

How can I safely update the handler of a BaseHTTPServer under Linux?

I'm trying to write a program that changes the content of a webpage with some user given parameters. After several tries and some googling, i've managed to get some results (I put the webserver in a thread in order to continue other tasks in the…
F. Zion
  • 3
  • 2
0
votes
0 answers

I need to get HTTP request header for TRACE?

I'm using python 2.7 and I want to implement the do_TRACE function for my HTTP server and I'm using the BaseHTTPServer library. I want to get the request header. How can I get it? How can I get the length of it? Please help me... def…
0
votes
2 answers

how to bind multiple specified ip address on BaseHTTPRequestHandler of python

My server has 3 ip addresses, 127.0.0.1, 192.168.0.100 and an internet ip address. I'm going to run a service written by python on this server, but I don't want it to expose on internet. I'm using BaseHTTPRequestHandler class to implement this…
hago
  • 1,700
  • 2
  • 16
  • 18
-1
votes
1 answer

Python's BaseHTTPServer returns junky responses

I use Python's BaseHTTPServer and implement the following very simple BaseHTTPRequestHandler: class WorkerHandler(BaseHTTPRequestHandler): def do_GET(self): self.wfile.write('{"status" : "ready"}') self.send_response(200) When…
SomethingSomething
  • 11,491
  • 17
  • 68
  • 126
1 2 3 4
5