简体   繁体   English

Python 脚本同时运行 FastCGI 和传统 CGI?

[英]Python script running both FastCGI and traditional CGI?

I have written a Python script that currently is designed to handle traditional CGI requests.我编写了一个Python 脚本,该脚本目前旨在处理传统的 CGI 请求。 Of course, this won't scale well as the overheads for each request are great, which is why I'm looking into implementing FastCGI support.当然,这不会很好地扩展,因为每个请求的开销都很大,这就是我正在研究实现 FastCGI 支持的原因。

How can I modify my script to work with both CGI and FastCGI?如何修改我的脚本以同时使用 CGI 和 FastCGI? Is there something the script can read from the environment that will identify if it is being spawned as either a traditional CGI request process or a FastCGI process?脚本是否可以从环境中读取某些内容来识别它是作为传统 CGI 请求进程还是 FastCGI 进程生成的? I don't really want to sacrifice traditional CGI support to implement FastCGI support.我真的不想牺牲传统的 CGI 支持来实现 FastCGI 支持。

Program to WSGI and use the flup adapters .编程到WSGI并使用Flup 适配器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM