basehttpserver
Python BaseHTTPServer, how do I catch/trap "broken pipe" errors?
I build a short url translator engine in Python, and I\'m seeing a TON of \"broken pipe\" errors, and I\'m curious how to trap it best when using the BaseHTTPServer classes. This isn\'t the entire cod[详细]
2023-03-07 06:39 分类:问答How to extract HTTP message body in BaseHTTPRequestHandler.do_POST()?
In the do_POST() method of BaseHTTPRequestHandler I can开发者_Python百科 access the headers of the POST request simply via the property self.headers. But I can\'t find a similar property for accessing[详细]
2023-03-05 03:18 分类:问答Getting Host field from HTTP request in BaseHTTPRequestHandler
I\'m writing a script using BaseHTTPRequestHandler class. And in do_GET(self) method I need to get the content of the Host field from the HTTP request. I can do it by regexping the str(self.headers) l[详细]
2023-02-28 10:02 分类:问答How do I serve image Content-types with Python BaseHTTPServerRequestHandler do_GET method?
I\'m using BaseHTTPServer to serve web content. I can serve Content-types \'text/html\' or \'text/css\' or even \'text/js\' and it renders on the browser side. But when I try to[详细]
2023-02-16 17:11 分类:问答Stuck with Python HTTP Server with Basic Authentication using BaseHTTP
I am stuck trying to get a python based webserver to work. I want to do Basic Authentication (sending a 401 header) and authenticating against a list of users. I have no trouble sending the 401 respo[详细]
2023-01-26 21:56 分类:问答Problems with my BaseHTTPServer
I am trying to create my own functions in the subclass of BaseHTTPRequestHandler as such class Weblog(BaseHTTPServer.BaseHTTPRequestHandler):[详细]
2023-01-11 22:11 分类:问答How to silent/quiet HTTPServer and BasicHTTPRequestHandler's stderr output?
I am writing a simple http server as part of my project. Below is a skeleton of my script: from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler[详细]
2023-01-10 02:06 分类:问答Python - BaseHTTPServer.HTTPServer Concurrency & Threading
I开发者_JAVA百科s there a way to make BaseHTTPServer.HTTPServer be multi-threaded like SocketServer.ThreadingTCPServer?You can simply use the threading mixin using both of those classes to make it mul[详细]
2022-12-22 08:57 分类:问答