glow:ragnarok.git
5 years agoDrop the set locale trick in last commit. Because we shouldn't try any
NalaGinrut [Sat, 24 Mar 2012 10:57:46 +0000 (18:57 +0800)]
Drop the set locale trick in last commit. Because we shouldn't try any
time string related to locale in protocol implementation.
And we shouldn't use with-locale in multi-threads context, because the
mutex will cause threads run slowly.
The new solution is suggested by Mark Weaver who is an experenced Guile
developper. So I used write-date in (web http) which is based on srfi-19
to handle this issue.
Anyway, I'll write my own write-date implementation because I want this
ragnarok self-contained.

5 years agoADD: with-locale to fix the time string bug.
NalaGinrut [Sat, 24 Mar 2012 05:09:32 +0000 (13:09 +0800)]
ADD: with-locale to fix the time string bug.
     The time string in rfc2822 must be in LC_TIME=C. So we must change
     locale temporately to get an valid time string for HTTP.

5 years agoFIXED: the bug in server:wait-for-listen-port-ready, which causes an unexpected infin...
NalaGinrut [Fri, 23 Mar 2012 05:56:31 +0000 (13:56 +0800)]
FIXED: the bug in server:wait-for-listen-port-ready, which causes an unexpected infinite loop.
Now the server runs OK, and static page test passed.
modified:   cee/event/rag_epoll.c
modified:   ragnarok/server.scm

5 years agoFixed the totally wrong usage of epoll module. Now the code is clearer.
NalaGinrut [Thu, 22 Mar 2012 11:14:38 +0000 (19:14 +0800)]
Fixed the totally wrong usage of epoll module. Now the code is clearer.

5 years agoepoll rocks! Now I think the left bugs is in protocols' method.
NalaGinrut [Wed, 21 Mar 2012 17:53:17 +0000 (01:53 +0800)]
epoll rocks! Now I think the left bugs is in protocols' method.
modified:   cee/event/rag_epoll.c
modified:   cee/event/rag_epoll.h
* FIXED: re-design the event_set struct. So there's no redundant events copy anymore which makes
         more efficient.
modified:   ragnarok/main.scm
* FIXED: The daemon eats almost 99% cpu. I added (sleep 1000) into infinite-loop, now it's OK!
modified:   ragnarok/posix.scm
* ADD: ragnarok-accept
modified:   ragnarok/server.scm
* FIXED: It causes problems when adding new request connect-socket into a write-set. So I removed it.

5 years agofixed epoll event module, killed many bugs, but still can't run :-(
NalaGinrut [Tue, 20 Mar 2012 19:46:04 +0000 (03:46 +0800)]
fixed epoll event module, killed many bugs, but still can't run :-(

5 years ago * change async-read old string way to bytevector.
NalaGinrut [Mon, 19 Mar 2012 17:15:36 +0000 (01:15 +0800)]
* change async-read old string way to bytevector.
* ADD: async-read-n
* rewrite async-write
* update event-create
modified:   ragnarok/server.scm
* ADD: server:register-request

5 years ago modified: ragnarok/aio.scm
NalaGinrut [Mon, 19 Mar 2012 09:05:00 +0000 (17:05 +0800)]
modified:   ragnarok/aio.scm
* FIX: tail-call is not safe in catch-context, so we change it to loop.
modified:   ragnarok/error.scm
modified:   ragnarok/utils.scm
* ADD: get-errno

5 years agoADD: assert in (rnrs base)
NalaGinrut [Mon, 19 Mar 2012 04:11:13 +0000 (12:11 +0800)]
ADD: assert in (rnrs base)
modified:   ragnarok/utils.scm

5 years agoChange the old way fork code to open-pipe*.
NalaGinrut [Mon, 19 Mar 2012 04:05:33 +0000 (12:05 +0800)]
Change the old way fork code to open-pipe*.
According Andy Wingo's proposal in Guile-dev, Guile can not
use fork after threads happens. So there's only popen can be used.
modified:   ragnarok/cgi/cgi.scm

5 years agoFIX: error handler can use 'case' directly
NalaGinrut [Thu, 23 Feb 2012 04:45:10 +0000 (12:45 +0800)]
FIX: error handler can use 'case' directly
modified:   ragnarok/aio.scm

5 years agoadd async-non-block read/write: async-read/async-write
NalaGinrut [Tue, 7 Feb 2012 13:53:04 +0000 (21:53 +0800)]
add async-non-block read/write: async-read/async-write

5 years agonew event module interface used, and make passed.
NalaGinrut [Mon, 30 Jan 2012 16:18:29 +0000 (00:18 +0800)]
new event module interface used, and make passed.
but some bugs there, still can't get request.
modified:   cee/event/event.c.in
modified:   cee/event/event.h
modified:   cee/event/rag_epoll.c
modified:   cee/event/rag_epoll.h
modified:   cee/event/rag_error.h
modified:   ragnarok/config.scm
modified:   ragnarok/env.scm
modified:   ragnarok/error.scm
modified:   ragnarok/event.scm
modified:   ragnarok/handler.scm
modified:   ragnarok/main.scm
modified:   ragnarok/server.scm
modified:   ragnarok/utils.scm

5 years agoADD: duo-licenses declaration GPL/LGPL 3
NalaGinrut [Sun, 29 Jan 2012 19:38:32 +0000 (03:38 +0800)]
ADD: duo-licenses declaration GPL/LGPL 3
UPDATE: program copyright fixed

5 years agoFIXED: unbound slot bug
NalaGinrut [Sun, 29 Jan 2012 19:37:19 +0000 (03:37 +0800)]
FIXED: unbound slot bug
modified:   ragnarok/server.scm

5 years agoADD: rag_epoll_set_append
NalaGinrut [Sun, 29 Jan 2012 19:35:59 +0000 (03:35 +0800)]
ADD: rag_epoll_set_append
modified:   cee/event/rag_epoll.c
modified:   cee/event/rag_epoll.h

5 years ago modified: ragnarok/utils.scm
NalaGinrut [Sun, 29 Jan 2012 16:22:57 +0000 (00:22 +0800)]
modified:   ragnarok/utils.scm
* DEL: unless/define-syntax-rule since Guile has them now

5 years ago modified: TODO
NalaGinrut [Fri, 27 Jan 2012 16:00:45 +0000 (00:00 +0800)]
modified:   TODO
modified:   cee/event/event.c.in
modified:   cee/event/rag_epoll.c
modified:   ragnarok/config.scm
modified:   ragnarok/env.scm
modified:   ragnarok/error.scm
modified:   ragnarok/event.scm
modified:   ragnarok/hook.scm
new file:   ragnarok/posix.scm
modified:   ragnarok/protocol/eips/eips.scm
new file:   ragnarok/protocol/eips/hook.scm
modified:   ragnarok/server.scm
modified:   ragnarok/utils.scm

5 years agoUPDATE: add new eips module
NalaGinrut [Thu, 19 Jan 2012 05:56:22 +0000 (13:56 +0800)]
UPDATE: add new eips module
modified:   cee/event/rag_epoll.c
modified:   ragnarok/config.scm
new file:   ragnarok/protocol.scm
new file:   ragnarok/protocol/eips/README
new file:   ragnarok/protocol/eips/eips.scm

5 years agoUPDATE: event module of SCM part
NalaGinrut [Wed, 18 Jan 2012 05:13:53 +0000 (13:13 +0800)]
UPDATE: event module of SCM part
modified:   TODO
modified:   cee/event/event.c.in
modified:   cee/event/rag_epoll.c
modified:   ragnarok/event.scm

5 years agoUPDATE: use substring/shared instead of string-copy
NalaGinrut [Wed, 4 Jan 2012 12:58:44 +0000 (20:58 +0800)]
UPDATE: use substring/shared instead of string-copy
modified:   ragnarok/cgi/guile.scm
modified:   ragnarok/error.scm
modified:   ragnarok/utils.scm

5 years agoADD: read-count
NalaGinrut [Wed, 28 Dec 2011 06:44:49 +0000 (14:44 +0800)]
ADD: read-count
modified:   ragnarok/utils.scm

6 years agorm rubbish
NalaGinrut [Sat, 17 Dec 2011 20:31:55 +0000 (04:31 +0800)]
rm rubbish

6 years agoFinish event module (the Cee part), and compiled successed!
NalaGinrut [Sat, 17 Dec 2011 20:22:35 +0000 (04:22 +0800)]
Finish event module (the Cee part), and compiled successed!
modified:   Makefile.in
modified:   cee/Makefile.mk
new file:   cee/event/Makefile.mk
renamed:    cee/event.c -> cee/event/event.c.in
renamed:    cee/event.h -> cee/event/event.h
renamed:    cee/generic.h -> cee/event/generic.h
renamed:    cee/rag_epoll.c -> cee/event/rag_epoll.c
renamed:    cee/rag_epoll.h -> cee/event/rag_epoll.h
renamed:    cee/rag_error.h -> cee/event/rag_error.h
new file:   cee/event/rag_kqueue.c
renamed:    cee/rag_kqueue.h -> cee/event/rag_kqueue.h
renamed:    cee/rag_select.c -> cee/event/rag_select.c
renamed:    cee/rag_select.h -> cee/event/rag_select.h
renamed:    cee/rag_struct.h -> cee/event/rag_struct.h
modified:   cee/lib_main.c
modified:   cee/lib_main.h
modified:   cee/sleep.c
new file:   obj/bin/ragnarok
new file:   obj/event/mmr.so
new file:   obj/libragnarok-event.so
new file:   obj/libragnarok.so
new file:   obj/ragnarok/server.scm.go.05t6ZI
modified:   ragnarok/event.scm

6 years agoUPDATE: fixed epoll_event_set set to fd_set, and fd_set ADD/DEL
NalaGinrut [Fri, 16 Dec 2011 16:14:30 +0000 (00:14 +0800)]
UPDATE: fixed epoll_event_set set to fd_set, and fd_set ADD/DEL
modified:   cee/event.h
modified:   cee/rag_epoll.c
modified:   cee/rag_epoll.h
modified:   cee/rag_select.c

6 years agoUPDATE: unify event interface
NalaGinrut [Thu, 15 Dec 2011 17:06:16 +0000 (01:06 +0800)]
UPDATE: unify event interface
modified:   cee/event.c
modified:   cee/event.h
new file:   cee/generic.h
modified:   cee/rag_epoll.c
modified:   cee/rag_epoll.h
modified:   cee/rag_error.h
modified:   cee/rag_select.c
modified:   cee/rag_select.h
modified:   ragnarok/event.scm

6 years agoUPDATE: rewrite the event structure
NalaGinrut [Wed, 14 Dec 2011 13:54:15 +0000 (21:54 +0800)]
UPDATE: rewrite the event structure
modified:   cee/check_perms.c
modified:   cee/create_this_path.c
modified:   cee/event.c
modified:   cee/event.h
modified:   cee/path_fix.c
modified:   cee/rag_epoll.c
modified:   cee/rag_epoll.h
modified:   cee/rag_select.c
modified:   cee/rag_select.h
modified:   cee/scandir.c

6 years agoFIX: memory leak since scm_to_locale_string didn't free.
NalaGinrut [Tue, 13 Dec 2011 16:55:00 +0000 (00:55 +0800)]
FIX: memory leak since scm_to_locale_string didn't free.
modified:   cee/check_perms.c
modified:   cee/create_this_path.c
modified:   cee/event.c
modified:   cee/event.h
modified:   cee/gcrypt.c
modified:   cee/path_fix.c
modified:   cee/rag_epoll.c
modified:   cee/rag_select.c
modified:   cee/scandir.c

6 years ago modified: cee/event.h
NalaGinrut [Mon, 12 Dec 2011 11:36:30 +0000 (19:36 +0800)]
modified:   cee/event.h
* ADD: epfd to scm_rag_mevent
modified:   cee/event.c
modified:   cee/rag_epoll.c
* UPDATE: epoll procs ,more works needed...
modified:   cee/rag_epoll.h
new file:   cee/rag_error.h
modified:   cee/rag_select.c
new file:   ragnarok/aio.scm
new file:   ragnarok/error.scm
modified:   ragnarok/server.scm
modified:   ragnarok/utils.scm

6 years ago deleted: cee/rag_struct.c
NalaGinrut [Mon, 28 Nov 2011 09:40:23 +0000 (17:40 +0800)]
deleted:    cee/rag_struct.c

6 years agoAt least this commit can be compiled...
NalaGinrut [Mon, 28 Nov 2011 09:38:34 +0000 (17:38 +0800)]
At least this commit can be compiled...
modified:   BUGS
modified:   Makefile.in
modified:   cee/event.c
modified:   cee/event.h
modified:   cee/lib_main.h
new file:   cee/rag_epoll.c
modified:   cee/rag_epoll.h
modified:   cee/rag_select.c
modified:   cee/rag_select.h
modified:   cee/rag_struct.h
modified:   cee/sleep.c
modified:   configure.ac
modified:   ragnarok/protocol/http/handler.scm

6 years ago modified: cee/event.c
NalaGinrut [Mon, 28 Nov 2011 06:20:59 +0000 (14:20 +0800)]
modified:   cee/event.c
modified:   cee/event.h
modified:   cee/lib_main.c
modified:   cee/lib_main.h
modified:   cee/rag_select.c
new file:   cee/sleep.c

6 years ago* ADD: ragnarok/event.scm
NalaGinrut [Sun, 27 Nov 2011 15:20:26 +0000 (23:20 +0800)]
* ADD: ragnarok/event.scm
* UPDATE: cee/event.c
 meta_event SMOB finished.
* ADD: cee/rag_struct.h
Macros for building SMOB.

6 years ago* cee/rag_select.c
NalaGinrut [Thu, 24 Nov 2011 15:34:16 +0000 (23:34 +0800)]
* cee/rag_select.c
  ADD: select_del_event
* cee/event.c
  ADD: meta_event struct and handlers

6 years agoFinished rag_select module
NalaGinrut [Mon, 21 Nov 2011 10:20:51 +0000 (18:20 +0800)]
Finished rag_select module
* ADD: lib_main.h
* UPDATE: rag_select.c/h

6 years agorm rubbish
NalaGinrut [Fri, 18 Nov 2011 12:00:06 +0000 (20:00 +0800)]
rm rubbish

6 years agoADD event
NalaGinrut [Fri, 18 Nov 2011 11:24:45 +0000 (19:24 +0800)]
ADD event

6 years agoFIX: path-fix crash bug fixed.
NalaGinrut [Sat, 5 Nov 2011 05:55:56 +0000 (13:55 +0800)]
FIX: path-fix crash bug fixed.

6 years agorm rubbish
NalaGinrut [Sat, 5 Nov 2011 04:17:15 +0000 (12:17 +0800)]
rm rubbish

6 years agoFix binary-file GET bug.
NalaGinrut [Sat, 5 Nov 2011 04:13:57 +0000 (12:13 +0800)]
Fix binary-file GET bug.
return script file as static page if it didn't appear in the "with-cgi" option.

6 years agoregular fix
NalaGinrut [Wed, 26 Oct 2011 05:18:32 +0000 (13:18 +0800)]
regular fix

6 years agorm rubbish
NalaGinrut [Wed, 26 Oct 2011 05:08:58 +0000 (13:08 +0800)]
rm rubbish

6 years agosub-server and request handler goes into threads now.
NalaGinrut [Wed, 26 Oct 2011 05:05:07 +0000 (13:05 +0800)]
sub-server and request handler goes into threads now.

6 years agoUse threads. But some bugs' still there.
NalaGinrut [Tue, 25 Oct 2011 16:22:29 +0000 (00:22 +0800)]
Use threads. But some bugs' still there.

6 years agoUPDATE: brand new config module
NalaGinrut [Mon, 24 Oct 2011 11:56:33 +0000 (19:56 +0800)]
UPDATE: brand new config module

6 years agoGuile cgi tpl runs! v0.0.3
NalaGinrut [Thu, 20 Oct 2011 05:53:25 +0000 (13:53 +0800)]
Guile cgi tpl runs!

6 years agoADD: gcrypt mda
NalaGinrut [Wed, 19 Oct 2011 04:50:54 +0000 (12:50 +0800)]
ADD: gcrypt mda
* ragnarok/gcrypt/mda.scm for digest algrithm.

6 years agoUPDATE: guile cgi module. But still can't run. The "eval-string" trick failed.
NalaGinrut [Tue, 18 Oct 2011 14:43:35 +0000 (22:43 +0800)]
UPDATE: guile cgi module. But still can't run. The "eval-string" trick failed.

6 years agoCGI runs!
NalaGinrut [Sat, 15 Oct 2011 13:39:22 +0000 (21:39 +0800)]
CGI runs!

6 years agoUPDATE: regular cgi handler v0.0.2
NalaGinrut [Fri, 14 Oct 2011 16:49:29 +0000 (00:49 +0800)]
UPDATE: regular cgi handler
* created ragnarok/info.scm
* added server-info to generic handler

6 years ago* configure.ac: fix version generation problem
NalaGinrut [Thu, 13 Oct 2011 11:18:31 +0000 (19:18 +0800)]
* configure.ac: fix version generation problem

6 years ago* Makefile.in: Fix temporary lib path while make utils.scm.go.
NalaGinrut [Thu, 13 Oct 2011 02:37:33 +0000 (10:37 +0800)]
* Makefile.in: Fix temporary lib path while make utils.scm.go.
* ragnarok/cgi/cgi.scm: add cgi env vars.

6 years agoCGI pipe read fixed.
NalaGinrut [Wed, 12 Oct 2011 05:22:49 +0000 (13:22 +0800)]
CGI pipe read fixed.

6 years agoADD: cache-core; standard-cgi
NalaGinrut [Tue, 11 Oct 2011 11:08:21 +0000 (19:08 +0800)]
ADD: cache-core; standard-cgi

6 years agomove Cee daemon to Guile version. Makefile fixed. ADD: lockf
NalaGinrut [Fri, 30 Sep 2011 16:51:18 +0000 (00:51 +0800)]
move Cee daemon to Guile version. Makefile fixed. ADD: lockf

6 years agofix v0.0.1
NalaGinrut [Sun, 25 Sep 2011 09:47:54 +0000 (17:47 +0800)]
fix

6 years agoADD: config.h.in
NalaGinrut [Sun, 25 Sep 2011 09:45:49 +0000 (17:45 +0800)]
ADD: config.h.in

6 years agoADD: config.sub
NalaGinrut [Sun, 25 Sep 2011 09:42:18 +0000 (17:42 +0800)]
ADD: config.sub

6 years agoADD: install-sh
NalaGinrut [Sun, 25 Sep 2011 09:29:15 +0000 (17:29 +0800)]
ADD: install-sh

6 years agofix: configure
NalaGinrut [Sun, 25 Sep 2011 09:22:22 +0000 (17:22 +0800)]
fix: configure

6 years agofix: configure
NalaGinrut [Sun, 25 Sep 2011 09:15:16 +0000 (17:15 +0800)]
fix: configure

6 years agoconfigure & make
NalaGinrut [Sun, 25 Sep 2011 09:09:00 +0000 (17:09 +0800)]
configure & make

6 years agomain program ragnarok.c as daemon
NalaGinrut [Wed, 21 Sep 2011 23:01:54 +0000 (07:01 +0800)]
main program ragnarok.c as daemon

6 years agoADD: Makefile.in
NalaGinrut [Mon, 19 Sep 2011 22:15:49 +0000 (06:15 +0800)]
ADD: Makefile.in

6 years agoADD: autoconf
NalaGinrut [Tue, 13 Sep 2011 14:40:27 +0000 (22:40 +0800)]
ADD: autoconf

6 years agomime type checking works now~
NalaGinrut [Mon, 12 Sep 2011 13:33:33 +0000 (21:33 +0800)]
mime type checking works now~

6 years agoADD path_fix
NalaGinrut [Sun, 11 Sep 2011 02:51:37 +0000 (10:51 +0800)]
ADD path_fix

6 years agoADD: scandir|fix_path
NalaGinrut [Wed, 7 Sep 2011 15:55:20 +0000 (23:55 +0800)]
ADD: scandir|fix_path

6 years agoADD: http/hook.scm http/handler.scm; FIX: module depencies problem; Enhance: use...
NalaGinrut [Tue, 6 Sep 2011 21:49:33 +0000 (05:49 +0800)]
ADD: http/hook.scm http/handler.scm; FIX: module depencies problem; Enhance: use hash-table instead of assoc-list, now it seems faster

6 years agoADD: request.scm
NalaGinrut [Mon, 5 Sep 2011 09:57:54 +0000 (17:57 +0800)]
ADD: request.scm

6 years agoGET/err page/HEAD are OK now. But show dirs still need more work...
NalaGinrut [Sun, 4 Sep 2011 16:36:55 +0000 (00:36 +0800)]
GET/err page/HEAD are OK now. But show dirs still need more work...

6 years agoADD: directory print
Nala Ginrut [Sat, 27 Aug 2011 17:01:22 +0000 (01:01 +0800)]
ADD: directory print

6 years agoUPDATE: file permit check
NalaGinrut [Sat, 27 Aug 2011 10:15:52 +0000 (18:15 +0800)]
UPDATE: file permit check

6 years agoUPDATE: add headers.scm/response.scm; rewrite http response module; mime support
NalaGinrut [Wed, 24 Aug 2011 22:26:51 +0000 (06:26 +0800)]
UPDATE: add headers.scm/response.scm; rewrite http response module; mime support

6 years agoUPDATE: add method.scm ,http methods handler added. But didn't fill them all.
NalaGinrut [Mon, 22 Aug 2011 17:32:59 +0000 (01:32 +0800)]
UPDATE: add method.scm ,http methods handler added. But didn't fill them all.

6 years agoUPDATE: static page serv's done
NalaGinrut [Sat, 20 Aug 2011 09:28:16 +0000 (17:28 +0800)]
UPDATE: static page serv's done

6 years agoUPDATE: server connection is done. Begin http protocol handler framework
NalaGinrut [Thu, 18 Aug 2011 09:47:56 +0000 (17:47 +0800)]
UPDATE: server connection is done. Begin http protocol handler framework

6 years agoUPDATE: fix bugs in the handler register, and ADD unregister. MOVE http module to...
NalaGinrut [Wed, 17 Aug 2011 17:53:40 +0000 (01:53 +0800)]
UPDATE: fix bugs in the handler register, and ADD unregister. MOVE http module to protocol/http/

6 years agoUPDATE: protocol handler register mechanism is done
NalaGinrut [Wed, 17 Aug 2011 16:58:38 +0000 (00:58 +0800)]
UPDATE: protocol handler register mechanism is done

6 years agoADD msg.scm | FINISH log.scm | UPDATE server.scm
NalaGinrut [Wed, 17 Aug 2011 09:29:33 +0000 (17:29 +0800)]
ADD msg.scm | FINISH log.scm | UPDATE server.scm

6 years agoUPDATE: config complete
NalaGinrut [Wed, 3 Aug 2011 09:43:36 +0000 (17:43 +0800)]
UPDATE: config complete

6 years agofirst commit. Don't expect anything\!
NalaGinrut [Tue, 2 Aug 2011 13:44:17 +0000 (21:44 +0800)]
first commit. Don't expect anything\!