아파치 모듈 질문입니다. ap_internal_redirect()를 호출하니 Internal Server Error가 발생하네요.
ap_internal_redirect()를 호출하니 Internal Server Error가 발생하네요.
아파치 1.3입니다.
코드는 아래와 같습니다.
-----------------------------------------------------
#include "httpd.h"
#include "http_config.h"
#include "http_protocol.h"
#include "ap_config.h"
static int sample_handler(request_rec *r)
{
ap_internal_redirect(ap_pstrcat(r->pool, r->filename, r->args ? "?" : NULL, r->args, NULL), r);
return OK;
}
static int sample_fixup(request_rec *r)
{
r->handler = "sample";
return OK;
}
static const handler_rec sample_handlers[] = {
{ "sample", sample_handler },
{ NULL, NULL }
};
module MODULE_VAR_EXPORT sample_module = {
STANDARD_MODULE_STUFF,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
sample_handlers,
NULL,
NULL,
NULL,
NULL,
NULL,
sample_fixup,
NULL,
NULL,
NULL,
NULL,
NULL
};
댓글 달기