Ejemplo n.º 1
0
static int replyHandler(ExHttp *pHttp)
{
  int rType ;
  int ret = -1 ;

  rType = checkpath( pHttp ) ;

  if ( strcmp( pHttp->method, "PUT" )==0 )
    ret = putProcess( pHttp, rType ) ;
  else if ( *pHttp->method=='D' )
    ret = deleteProcess( pHttp, rType ) ;
  else {
    switch ( rType ) {
      case 0: /* static file */
        ret = staticProcess( pHttp ) ;
        break ;
      case 1: /* dyanamic page: '.cgi' extension */
        ret = cgiProcess( pHttp ) ;
        break ;
      default:
        ex_error_reply( pHttp, rType ) ;
    }
  }
  clearHttp( pHttp ) ;
  return ret ;
}
Ejemplo n.º 2
0
static int replyHandler(ExHttp *pHttp)
{
	int rType;
	int ret = -1;

	rType = checkpath(pHttp);
	DBG("filetype: %d\n", rType);
	switch (rType) {
	case 0: 	/* static file */
		ret = staticProcess(pHttp);
		break;
	case 1: 	/* dyanamic page: '.cgi' extension */
		ret = cgiProcess(pHttp);
		break;
	default:
		ex_error_reply(pHttp, rType);
	}
	clearHttp(pHttp);
	return ret;
}