Answer the question
In order to leave comments, you need to log in
How to disable the standard 200 OK in Tornado?
Good day.
The fact is that if you use standard python tools such as BaseHTTPServer, BaseHTTPRequestHandler, and override the do_POST, do_GET methods and work with requests, then you can generate responses to them yourself. But if you do not form a response at all, but simply receive a request and process the received data, then BaseHTTPServer will not answer anything.
When using Tornado, if we form our own response, everything is OK, but if we don’t respond to the request at all. then tornado.web.RequestHandler itself will respond with a standard 200 OK.
How can I make Tornado work like BaseHTTPServer and not respond if the response is not formed by handles?
I won’t say that I have a lot of experience, but in the BaseHTTPServer sources I quickly find the code sections I need and understand what they are responsible for. With Tornado, everything is not entirely obvious.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question