Blob
- Date:
- Message:
- fastcgi: a first implementation Not production-ready yet, but it's a start. This adds a third ``backend'' for gmid: until now there it served local files or CGI scripts, now FastCGI applications too. FastCGI is meant to be an improvement over CGI: instead of exec'ing a script for every request, it allows to open a single connection to an ``application'' and send the requests/receive the responses over that socket using a simple binary protocol. At the moment gmid supports three different methods of opening a fastcgi connection: - local unix sockets, with: fastcgi "/path/to/sock" - network sockets, with: fastcgi tcp "host" [port] port defaults to 9000 and can be either a string or a number - subprocess, with: fastcgi spawn "/path/to/program" the fastcgi protocol is done over the executed program stdin of these, the last is only for testing and may be removed in the future. P.S.: the fastcgi rule is per-location of course :)
- Actions:
- History | Blame | Raw File
1 .PHONY: all static clean regress install3 all: Makefile.local gmid TAGS compile_flags.txt5 Makefile.local: configure6 ./configure8 include Makefile.local10 lex.yy.c: lex.l y.tab.c11 ${LEX} lex.l13 y.tab.c: parse.y14 ${YACC} -b y -d parse.y16 SRCS = gmid.c iri.c utf8.c ex.c server.c sandbox.c mime.c puny.c \17 utils.c log.c dirs.c fcgi.c18 OBJS = ${SRCS:.c=.o} lex.yy.o y.tab.o ${COMPAT}20 gmid: ${OBJS}21 ${CC} ${OBJS} -o gmid ${LDFLAGS}23 gg: gg.o iri.o utf8.o ${COMPAT}24 ${CC} gg.o iri.o utf8.o ${COMPAT} -o $@ ${LDFLAGS}26 static: ${OBJS}27 ${CC} ${OBJS} -o gmid ${LDFLAGS} ${STATIC}29 TAGS: ${SRCS}30 @(etags ${SRCS} || true) 2>/dev/null32 clean:33 rm -f *.o compat/*.o lex.yy.c y.tab.c y.tab.h y.output gmid gg34 rm -f compile_flags.txt35 make -C regress clean37 regress: gmid gg38 make -C regress all40 install: gmid41 mkdir -p ${DESTDIR}${BINDIR}42 mkdir -p ${DESTDIR}${MANDIR}/man143 ${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}44 ${INSTALL_MAN} gmid.1 ${DESTDIR}${MANDIR}/man146 compile_flags.txt:47 printf "%s\n" ${CFLAGS} > compile_flags.txt49 # make sure we pass -o to ${CC}. OpenBSD default suffix rule doesn't50 .SUFFIXES: .c .o51 .c.o:52 ${CC} ${CFLAGS} -c $< -o $@