C언어 CGI 소스분석
- 최초 등록일
- 2007.04.23
- 최종 저작일
- 2007.04
- 37페이지/ 한컴오피스
- 가격 10,000원
소개글
C로 짠 CGI 소스를 분석 실행한 레포트.
목차
없음
본문내용
#define cgiStrEq(a, b) (!strcmp((a), (b)))
char *cgiServerSoftware;
char *cgiServerName;
char *cgiGatewayInterface;
char *cgiServerProtocol;
char *cgiServerPort;
char *cgiRequestMethod;
char *cgiPathInfo;
char *cgiPathTranslated;
char *cgiScriptName;
char *cgiQueryString;
char *cgiRemoteHost;
char *cgiRemoteAddr;
char *cgiAuthType;
char *cgiRemoteUser;
char *cgiRemoteIdent;
char *cgiContentType;
int cgiContentLength;
char *cgiAccept;
char *cgiUserAgent;
FILE *cgiIn;
FILE *cgiOut;
/* One form entry, consisting of an attribute-value pair. */
/* value와 attribute를 저장할 struct. liked list로 구현되있다.*/
typedef struct cgiFormEntryStruct {
char *attr; // 여기에 attribute들이 들어간다.
char *value; // 여기에 value들이 들어간다.
struct cgiFormEntryStruct *next; //다시 자신을 가리킴으로 liked list 구현.
} cgiFormEntry;
/* The first form entry. */
static cgiFormEntry *cgiFormEntryFirst; // 리스트의 첫번째를 가리킬 변수.
/* True if CGI environment was restored from a file. */
static int cgiRestored = 0;
static void cgiGetenv(char **s, char *var);
typedef enum {
cgiParseSuccess,
cgiParseMemory,
cgiParseIO
} cgiParseResultType;
static cgiParseResultType cgiParseGetFormInput();
static cgiParseResultType cgiParsePostFormInput();
static cgiParseResultType cgiParseFormInput(char *data, int length);
static void cgiSetupConstants();
참고 자료
없음