WebGate

Check-in [ef5e410c61]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use bundled suspension with protobuf by default, install separately, also allow external version
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ef5e410c61beb1966a960aedf67a6be46f741913
User & Date: murphy 2015-05-04 19:13:48
Context
2017-02-23
18:35
Point release-info to chisel mirror check-in: 42f9503521 user: murphy tags: trunk
2015-05-04
19:13
Use bundled suspension with protobuf by default, install separately, also allow external version check-in: ef5e410c61 user: murphy tags: trunk
15:17
Default to HTTP header lookup through getenv, even without HTTP_ prefix for soup driver check-in: 35c35fb8b5 user: murphy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to webgate.meta.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;; -*- mode: Scheme; -*-
((category net)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "(S)CGI web application framework")
 (needs srfi-99 suspension tweetnacl)
 (files
  "suspension.scm"
  "webgate.scm"
  "at-expr.scm"
  "webgate-utils.scm"
  "webgate-core.scm"
  "webgate-suspend.scm"
  "webgate-cgi.scm"
  "webgate-scgi.scm"))





|









1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;; -*- mode: Scheme; -*-
((category net)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "(S)CGI web application framework")
 (needs srfi-99 protobuf tweetnacl)
 (files
  "suspension.scm"
  "webgate.scm"
  "at-expr.scm"
  "webgate-utils.scm"
  "webgate-core.scm"
  "webgate-suspend.scm"
  "webgate-cgi.scm"
  "webgate-scgi.scm"))

Changes to webgate.scm.

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
   srfi-13 srfi-18 srfi-69
   data-structures irregex webgate-utils tcp
   (only webgate-core write-response))
  (include
   "webgate-scgi.scm"))

(cond-expand
  (enable-soup
   (module webgate-soup
     (soup-main-loop)
     (import
      scheme chicken foreign
      srfi-1 srfi-13
      data-structures webgate-core)
     (include
................................................................................
   scheme chicken
   srfi-13 irregex webgate-cgi webgate-scgi tcp
   (only webgate-core
	 handle-request)
   (only webgate-suspend
	 current-suspension-key))
  (cond-expand
    (enable-soup
     (import webgate-soup))
    (else))
  (reexport
   (only webgate-core
	 message make-message message?
	 message-type message-headers message-body message-text
	 parameter-list-ref parameter-ref
................................................................................
		    (let ((ear (tcp-listen port backlog host)))
		      (dynamic-wind
			  void
			  (cut scgi-main-loop handle-request ear)
			  (cut tcp-close ear))))
		   ((http)
		    (cond-expand
		     (enable-soup
		      (soup-main-loop handle-request port host))
		     (else
		      (error 'webgate-main "HTTP support not enabled"))))
		   (else
		    (error 'webgate-main "Unknown protocol" protocol))))
	       (error 'webgate-main "Bad listener specification" listen)))
	 (cgi-main-loop handle-request)))







|







 







|







 







|







97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
   srfi-13 srfi-18 srfi-69
   data-structures irregex webgate-utils tcp
   (only webgate-core write-response))
  (include
   "webgate-scgi.scm"))

(cond-expand
  (enable-webgate-soup
   (module webgate-soup
     (soup-main-loop)
     (import
      scheme chicken foreign
      srfi-1 srfi-13
      data-structures webgate-core)
     (include
................................................................................
   scheme chicken
   srfi-13 irregex webgate-cgi webgate-scgi tcp
   (only webgate-core
	 handle-request)
   (only webgate-suspend
	 current-suspension-key))
  (cond-expand
    (enable-webgate-soup
     (import webgate-soup))
    (else))
  (reexport
   (only webgate-core
	 message make-message message?
	 message-type message-headers message-body message-text
	 parameter-list-ref parameter-ref
................................................................................
		    (let ((ear (tcp-listen port backlog host)))
		      (dynamic-wind
			  void
			  (cut scgi-main-loop handle-request ear)
			  (cut tcp-close ear))))
		   ((http)
		    (cond-expand
		     (enable-webgate-soup
		      (soup-main-loop handle-request port host))
		     (else
		      (error 'webgate-main "HTTP support not enabled"))))
		   (else
		    (error 'webgate-main "Unknown protocol" protocol))))
	       (error 'webgate-main "Bad listener specification" listen)))
	 (cgi-main-loop handle-request)))

Changes to webgate.setup.

1
2
3


4
5




6
7
8




9
10
11

12
13






14
15
16
17
18
19
20
..
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
;; -*- mode: Scheme; -*-
(cond-expand
 (webgate-internal-suspension


  (compile -s -O2 -d1 "suspension.scm" -j suspension)
  (compile -s -O2 -d0 "suspension.import.scm"))




 (else
  ))





(cond-expand
 ((and webgate-internal-suspension enable-static)
  (compile -c -O2 -d1 "suspension.scm" -unit suspension))

 (else
  ))







(compile -s -O2 -d1 "webgate.scm" -lbz2 -J)
(compile -s -O2 -d1 "at-expr.scm")

(cond-expand
 (enable-static
  (compile -c -O2 -d1 "webgate.scm" -unit webgate))
................................................................................
(compile -s -O2 -d0 "webgate.import.scm")
(compile -s -O2 -d0 "webgate-utils.import.scm")
(compile -s -O2 -d0 "webgate-core.import.scm")
(compile -s -O2 -d0 "webgate-suspend.import.scm")
(compile -s -O2 -d0 "webgate-cgi.import.scm")
(compile -s -O2 -d0 "webgate-scgi.import.scm")
(cond-expand
 (enable-soup
  (compile -s -O2 -d0 "webgate-soup.import.scm"))
 (else
  ))

(install-extension
 'webgate
 `(,@(cond-expand
      (webgate-internal-suspension
       '("suspension.so"
	 "suspension.import.so"))
      (else
       '()))
   ,@(cond-expand
      ((and webgate-internal-suspension enable-static)
       '("suspension.o"))
      (else
       '()))
   "webgate.so"
   "at-expr.so"
   ,@(cond-expand
      (enable-static
       '("webgate.o"))
      (else
       '()))
   "webgate.import.so"
   "webgate-utils.import.so"
   "webgate-core.import.so"
   "webgate-suspend.import.so"
   "webgate-cgi.import.so"
   "webgate-scgi.import.so"
   ,@(cond-expand
      (enable-soup
       '("webgate-soup.import.so"))
      (else
       '())))
 `((version "2.0.0")
   ,@(cond-expand
      (enable-static
       '((static "webgate.o")))
      (else
       '()))))


|
>
>

|
>
>
>
>
|
|

>
>
>
>
|
|
<
>
|
|
>
>
>
>
>
>







 







|






<
<
<
<
<
<
<
<
<
<
<
|













|









1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53











54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
;; -*- mode: Scheme; -*-
(cond-expand
 (webgate-external-suspension
  )
 (else
  (compile -s -O2 -d1 "suspension.scm" -j suspension)
  (compile -s -O2 -d0 "suspension.import.scm")

  (cond-expand
   (enable-static
    (compile -c -O2 -d1 "suspension.scm" -unit suspension))
   (else
    ))

  (install-extension
   'suspension
   `("suspension.so"
     "suspension.import.so"
     ,@(cond-expand
	(enable-static

	 '("suspension.o"))
	(else
	 '())))
   `((version "0.4.0_protobuf")
     ,@(cond-expand
	(enable-static
	 '((static "suspension.o")))
	(else
	 '()))))))

(compile -s -O2 -d1 "webgate.scm" -lbz2 -J)
(compile -s -O2 -d1 "at-expr.scm")

(cond-expand
 (enable-static
  (compile -c -O2 -d1 "webgate.scm" -unit webgate))
................................................................................
(compile -s -O2 -d0 "webgate.import.scm")
(compile -s -O2 -d0 "webgate-utils.import.scm")
(compile -s -O2 -d0 "webgate-core.import.scm")
(compile -s -O2 -d0 "webgate-suspend.import.scm")
(compile -s -O2 -d0 "webgate-cgi.import.scm")
(compile -s -O2 -d0 "webgate-scgi.import.scm")
(cond-expand
 (enable-webgate-soup
  (compile -s -O2 -d0 "webgate-soup.import.scm"))
 (else
  ))

(install-extension
 'webgate











 `("webgate.so"
   "at-expr.so"
   ,@(cond-expand
      (enable-static
       '("webgate.o"))
      (else
       '()))
   "webgate.import.so"
   "webgate-utils.import.so"
   "webgate-core.import.so"
   "webgate-suspend.import.so"
   "webgate-cgi.import.so"
   "webgate-scgi.import.so"
   ,@(cond-expand
      (enable-webgate-soup
       '("webgate-soup.import.so"))
      (else
       '())))
 `((version "2.0.0")
   ,@(cond-expand
      (enable-static
       '((static "webgate.o")))
      (else
       '()))))