91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 458KB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-06-16
  • 語言: ASP
  • 標簽: apache??fcgi??

資源簡介

http://blog.csdn.net/wangkangluo1/archive/2011/05/11/6411641.aspx [原創(chuàng)] Redhat 上 FastCGI 安裝與配置 軟件包 相關軟件包: httpd httpd-devel fcgi-2.4.0.tar.gz mod_fastcgi-2.4.6.tar.gz 請仔細閱讀其中的README 配置httpd.conf: LoadModule fastcgi_module modules/mod_fastcgi.so AddHandler fastcgi-script .fcgi # you can put whatever extension you want FastCgiIpcDir /tmp FastCgiServer /home/m/Dev/cvs/ImRoBot5/shdaily/cgi/shdaily.fcgi -processes 1 -idle-timeout 1000

資源截圖

代碼片段和文件信息

/*
?*?cgifcgi.c?--
?*
?* CGI?to?FastCGI?bridge
?*
?*
?*?Copyright?(c)?1996?Open?Market?Inc.
?*
?*?See?the?file?“LICENSE.TERMS“?for?information?on?usage?and?redistribution
?*?of?this?file?and?for?a?DISCLAIMER?OF?ALL?WARRANTIES.
?*
?*/
#ifndef?lint
static?const?char?rcsid[]?=?“$Id:?cgi-fcgi.cv?1.15?2001/09/01?01:14:28?robs?Exp?$“;
#endif?/*?not?lint?*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?

#include?“fcgi_config.h“

#ifdef?HAVE_NETDB_H
#include?
#endif

#ifdef?_WIN32
#include?
#include?
#else
extern?char?**environ;
#endif

#ifdef?HAVE_SYS_PARAM_H
#include?
#endif

#ifdef?HAVE_SYS_TIME_H
#include?
#endif

#ifdef?HAVE_UNISTD_H
#include?
#endif

#include?“fcgimisc.h“
#include?“fcgiapp.h“
#include?“fastcgi.h“
#include?“fcgios.h“


static?int?wsReadPending?=?0;
static?int?fcgiReadPending?=?0;
static?int?fcgiWritePending?=?0;

static?void?ScheduleIo(void);


/*
?*?Simple?buffer?(not?ring?buffer)?type?used?by?all?event?handlers.
?*/
#define?BUFFLEN?8192
typedef?struct?{
????char?*next;
????char?*stop;
????char?buff[BUFFLEN];
}?Buffer;

/*
?*----------------------------------------------------------------------
?*
?*?GetPtr?--
?*
?*??????Returns?a?count?of?the?number?of?characters?available
?*??????in?the?buffer?(at?most?n)?and?advances?past?these
?*??????characters.??Stores?a?pointer?to?the?first?of?these
?*??????characters?in?*ptr.
?*
?*----------------------------------------------------------------------
?*/

static?int?GetPtr(char?**ptr?int?n?Buffer?*pBuf)
{
????int?result;
????*ptr?=?pBuf->next;
????result?=?min(n?pBuf->stop?-?pBuf->next);
????pBuf->next?+=?result;
????return?result;
}

/*
?*----------------------------------------------------------------------
?*
?*?MakeHeader?--
?*
?*??????Constructs?an?FCGI_Header?struct.
?*
?*----------------------------------------------------------------------
?*/
static?FCGI_Header?MakeHeader(
????????int?type
????????int?requestId
????????int?contentLength
????????int?paddingLength)
{
????FCGI_Header?header;
????ASSERT(contentLength?>=?0?&&?contentLength?<=?FCGI_MAX_LENGTH);
????ASSERT(paddingLength?>=?0?&&?paddingLength?<=?0xff);
????header.version?=?FCGI_VERSION_1;
????header.type?????????????=?(unsigned?char)?type;
????header.requestIdB1??????=?(unsigned?char)?((requestId?????>>?8)?&?0xff);
????header.requestIdB0??????=?(unsigned?char)?((requestId?????????)?&?0xff);
????header.contentLengthB1??=?(unsigned?char)?((contentLength?>>?8)?&?0xff);
????header.contentLengthB0??=?(unsigned?char)?((contentLength?????)?&?0xff);
????header.paddingLength????=?(unsigned?char)?paddingLength;
????header.reserved?????????=??0;
????return?header;
}

/*
?*----------------------------------------------------------------------
?*
?*?MakeBeginRequestBody?--
?*
?*??????Constructs?an?FCGI_BeginRequestBody?record.
?*
?*-------------------------------------------

評論

共有 條評論

相關資源