|
2 | 2 | Title: "HTTPd Scheme"
|
3 | 3 | Type: module
|
4 | 4 | Name: httpd
|
5 |
| - Date: 10-Jan-2024 |
6 |
| - Version: 0.9.1 |
| 5 | + Date: 4-Jun-2024 |
| 6 | + Version: 0.9.2 |
7 | 7 | Author: ["Andreas Bolka" "Christopher Ross-Gill" "Oldes"]
|
8 | 8 | Exports: [serve-http http-server decode-target to-CLF-idate]
|
9 | 9 | Home: https://github.com/Oldes/Rebol-HTTPd
|
@@ -37,7 +37,7 @@ Rebol [
|
37 | 37 | 09-May-2023 "Oldes" {Root-less configuration possibility (default)}
|
38 | 38 | 14-Dec-2023 "Oldes" {Deprecated the `http-server` function in favor of `serve-http` with a different configuration input}
|
39 | 39 | ]
|
40 |
| - Needs: [3.16.0 mime-types] ;; new construction syntax since 3.16.0 |
| 40 | + Needs: [3.11.0 mime-types] |
41 | 41 | ]
|
42 | 42 |
|
43 | 43 | append system/options/log [httpd: 1]
|
@@ -216,11 +216,11 @@ sys/make-scheme [
|
216 | 216 | clients: make block! 16
|
217 | 217 | ]
|
218 | 218 | subport/extra/config:
|
219 |
| - config: make map! [ |
220 |
| - root: #(none) |
| 219 | + config: make map! reduce/no-set [ |
| 220 | + root: none |
221 | 221 | index: [%index.html %index.htm]
|
222 |
| - keep-alive: #(true) |
223 |
| - list-dir?: #(true) |
| 222 | + keep-alive: true |
| 223 | + list-dir?: true |
224 | 224 | server-name: "Rebol3-HTTPd"
|
225 | 225 | ]
|
226 | 226 | ]
|
@@ -618,7 +618,7 @@ sys/make-scheme [
|
618 | 618 | ]
|
619 | 619 |
|
620 | 620 | Awake-Client: wrap [
|
621 |
| - chars-method: #(bitset! #{00000000000000007FFFFFE0}) ; #"A" - #"Z" |
| 621 | + chars-method: charset [#"A" - #"Z"] |
622 | 622 | ;from-method: ["GET" | "POST" | "HEAD" | "PUT" | "DELETE" | "TRACE" | "CONNECT" | "OPTIONS"]
|
623 | 623 | chars: complement union space: charset " " charset [#"^@" - #"^_"]
|
624 | 624 | CRLF2BIN: #{0D0A0D0A}
|
@@ -917,7 +917,7 @@ sys/make-scheme [
|
917 | 917 | ;try [remove find clients port]
|
918 | 918 | ]
|
919 | 919 | log-debug ["Ports open:" length? clients]
|
920 |
| - if ctx/done? [ |
| 920 | + if all [ctx/done? zero? length? clients][ |
921 | 921 | log-more "Server's job done, closing initiated"
|
922 | 922 | ctx/parent/data: ctx/done?
|
923 | 923 | Awake-Server make event! [type: 'CLOSE port: ctx/parent]
|
@@ -988,11 +988,11 @@ http-server: function [
|
988 | 988 | actions [block! object!] "Functions like: On-Get On-Post On-Post-Received On-Read On-List-Dir On-Not-Found"
|
989 | 989 | /no-wait "Will not enter wait loop"
|
990 | 990 | ][
|
991 |
| - sys/log/error 'HTTPD "`http-server` function is deprecated, use `start-http` instead!" |
| 991 | + sys/log/error 'HTTPD "`http-server` function is deprecated, use `serve-http` instead!" |
992 | 992 | spec: either config [[]][to block! spec]
|
993 | 993 | if actor [extend spec 'actor actions]
|
994 | 994 | extend spec 'port port
|
995 |
| - start-http/:no-wait spec |
| 995 | + serve-http/:no-wait spec |
996 | 996 | ]
|
997 | 997 |
|
998 | 998 | serve-http: function [
|
|
0 commit comments