home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
HYPERMAI
/
HYPERMAI.ZIP
/
libcgi
/
mcode.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-16
|
693b
|
24 lines
/*
* This file is part of the LIBCGI library
*
* Copyright 1994 by Enterprise Integration Technologies Corporation
*
* This is freeware with commercialization rights reserved; see the
* LICENSE included in the distribution for specifics.
*/
#include <stdio.h>
#include "cgi.h"
int mcode(ci)
cgi_info *ci;
{
if (ci->request_method == NULL) return 0;
else if (!strnicmp(ci->request_method, "GET", 3)) return MCODE_GET;
else if (!strnicmp(ci->request_method, "POST", 4)) return MCODE_POST;
else if (!strnicmp(ci->request_method, "PUT", 3)) return MCODE_PUT;
else if (!strnicmp(ci->request_method, "HEAD", 4)) return MCODE_HEAD;
else return 0;
}