example.txt
上传用户:ladybrid91
上传日期:2007-01-04
资源大小:287k
文件大小:1k
- #include "phttpd.h"
- int pm_init(const char **argv)
- {
- return 0;
- }
- void pm_exit(void)
- {
- }
- int pm_request(struct connectioninfo *cip)
- {
- char buf[64];
- int fd = cip->fd;
- struct httpinfo *hip = cip->hip;
- if (!(strcasecmp(hip->method, "GET") == 0 ||
- strcasecmp(hip->method, "HEAD") == 0))
- return -1;
- if (hip->mip)
- {
- http_sendheaders(fd, cip->cn_time, 200, NULL);
- http_sendlastmodified(fd, cip->cn_time);
- fd_puts("Content-Type: text/htmln", fd);
- }
-
- if (strcasecmp(hip->method, "HEAD") == 0)
- return 200;
- if (hip->mip != NULL)
- fd_putc('n', fd);
-
- html_sysheader(fd, "H2", "Test-Module");
- fd_puts("Hello, Worldn", fd);
- html_sysfooter(fd);
- return 200;
- }