Skip to content

Commit 59576ca

Browse files
committed
CHANGE: renamed httpd module to have .reb extension and small improvements in its test file
1 parent 755e8e9 commit 59576ca

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

src/modules/httpd.r3 src/modules/httpd.reb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Rebol [
22
Title: "HTTPD Scheme"
33
Date: 02-Jul-2020
44
Author: ["Andreas Bolka" "Christopher Ross-Gill" "Oldes"]
5-
File: %httpd.r3
5+
File: %httpd.reb
66
Name: 'httpd
77
Type: 'module
88
Version: 0.6.0

src/tests/test-httpd.r3

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Rebol [
22
Title: "Test HTTPD Scheme"
3-
Date: 10-May-2020
3+
Date: 02-Jul-2020
44
Author: "Oldes"
55
File: %test-httpd.r3
6-
Version: 0.5.0
6+
Version: 0.6.0
77
Note: {
88
To test POST method from Rebol console, try this:
99
```
@@ -14,11 +14,26 @@ Rebol [
1414
}
1515
]
1616
secure [%../modules/ allow]
17-
do %../modules/httpd.r3
17+
do %../modules/httpd.reb
1818

1919
system/options/log/httpd: 3 ; for verbose output
2020

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+
2237
On-Accept: func [info [object!]][
2338
; allow only connections from localhost
2439
; TRUE = accepted, FALSE = refuse
@@ -53,17 +68,4 @@ my-actor: object [
5368
"</code> data:<pre>" mold ctx/inp/content </pre>
5469
]
5570
]
56-
57-
5871
]
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

Comments
 (0)