1
1
Rebol [
2
2
Title: "Test HTTPD Scheme"
3
- Date: 10-May -2020
3
+ Date: 02-Jul -2020
4
4
Author: "Oldes"
5
5
File: %test-httpd.r3
6
- Version: 0.5 .0
6
+ Version: 0.6 .0
7
7
Note: {
8
8
To test POST method from Rebol console, try this:
9
9
```
@@ -14,11 +14,26 @@ Rebol [
14
14
}
15
15
]
16
16
secure [%../modules/ allow]
17
- do %../modules/httpd.r3
17
+ do %../modules/httpd.reb
18
18
19
19
system/options/log/httpd: 3 ; for verbose output
20
20
21
- my-actor: object [
21
+ ; make sure that there is the directory for logs
22
+ make-dir/deep %httpd-root/logs/
23
+
24
+ http-server/config/actor 8081 [
25
+ ;- Main server configuration
26
+
27
+ root: %httpd-root/
28
+ server-name: "nginx" ;= it's possible to hide real server name
29
+ keep-alive: [15 100 ] ;= [timeout max-requests] or FALSE to turn it off
30
+ log-access: %httpd-root/logs/test-access.log
31
+ log-errors: %httpd-root/logs/test-errors.log
32
+ list-dir?: #[true]
33
+
34
+ ] [
35
+ ;- Server's actor functions
36
+
22
37
On-Accept : func [ info [object! ]] [
23
38
; allow only connections from localhost
24
39
; TRUE = accepted, FALSE = refuse
@@ -53,17 +68,4 @@ my-actor: object [
53
68
"</code> data:<pre>" mold ctx/inp/content </pre >
54
69
]
55
70
]
56
-
57
-
58
71
]
59
-
60
- make-dir/deep %httpd-root/logs/
61
-
62
- http-server/config/actor 8081 [
63
- root: %httpd-root/
64
- server-name: "nginx" ;= it's possible to hide real server name
65
- keep-alive: [15 100 ] ;= [timeout max-requests] or FALSE to turn it off
66
- log-access: %httpd-root/logs/test-access.log
67
- log-errors: %httpd-root/logs/test-errors.log
68
- list-dir?: #[true]
69
- ] my-actor
0 commit comments