Changeset 40 in Main
- Timestamp:
- Sep 17, 2024, 9:31:08 PM (2 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Module/Makefile
r39 r40 4 4 5 5 .PHONY: all clean 6 .SUFFIXES: .c .o .so6 .SUFFIXES: .c .o $(LIB) 7 7 8 all: mod_ example.so mod_cgi.so8 all: mod_cgi$(LIB) 9 9 10 .o .so:10 .o$(LIB): 11 11 $(CC) $(LDFLAGS) -shared -o $@ $< ../Common/common.a $(LIBS) 12 12 13 13 .c.o: 14 $(CC) $(CFLAGS) - fPIC -c -o $@ $<14 $(CC) $(CFLAGS) -c -o $@ $< 15 15 16 16 clean: -
trunk/Module/mod_cgi.c
r39 r40 2 2 3 3 #include "../Server/tw_module.h" 4 5 #include <cm_string.h> 4 6 5 7 int mod_init(struct tw_config* config, struct tw_tool* tools) { … … 10 12 11 13 int mod_config(struct tw_tool* tools, char** argv, int argc) { 12 printf("args %d\n", argc); 13 return TW_CONFIG_ERROR; 14 if(cm_strcaseequ(argv[0], "AllowCGI")) { 15 return TW_CONFIG_PARSED; 16 } 17 return TW_CONFIG_NOTME; 14 18 } 15 19 -
trunk/Module/mod_example.c
r20 r40 1 1 /* $Id$ */ 2 /* This module will accept all directives, and always return 403 on the access. */ 2 3 3 4 #include "../Server/tw_module.h" … … 9 10 } 10 11 12 int mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_PARSED; } 13 11 14 int mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_ERROR(403); } -
trunk/Platform/generic.mk
r17 r40 3 3 CC = cc 4 4 AR = ar 5 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common 5 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -fPIC 6 6 LDFLAGS = 7 7 LIBS = -
trunk/Platform/linux.mk
r26 r40 3 3 CC = cc 4 4 AR = ar 5 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -D_DEFAULT_SOURCE 5 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -D_DEFAULT_SOURCE -fPIC 6 6 LDFLAGS = 7 7 LIBS = -
trunk/Platform/win64.mk
r25 r40 5 5 CC = x86_64-w64-mingw32-gcc 6 6 AR = x86_64-w64-mingw32-ar 7 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -I $(PWD)/openssl/include 7 CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I $(PWD)/Common -I $(PWD)/openssl/include -fPIC 8 8 LDFLAGS = -L $(PWD)/openssl/lib 9 9 LIBS = -lws2_32 -
trunk/example.conf
r39 r40 30 30 Allow all 31 31 EndDirectory 32 33 BeginDirectory /var/www/cgi-bin 34 AllowCGI 35 EndDirectory
Note:
See TracChangeset
for help on using the changeset viewer.