@@ -94,18 +94,18 @@ sync-op: func [port body /local state encoding content-type code-page tmp][
94
94
parse content-type ["text/" [thru "charset=" copy code-page to end] to end]
95
95
][
96
96
unless code-page [code-page: "utf-8" ]
97
- sys/log/info 'HTTP ["trying to decode from code-page:^[ [m" code-page]
97
+ sys/log/info 'HTTP ["Trying to decode from code-page:^[ [m" code-page]
98
98
if string? tmp: try [iconv body code-page][ body: tmp ]
99
99
]
100
100
101
101
if state/close? [
102
- sys/log/more 'HTTP ["closing port for:^[ [m" port/spec/ref ]
102
+ sys/log/more 'HTTP ["Closing port for:^[ [m" port/spec/ref ]
103
103
close port
104
104
]
105
105
body
106
106
]
107
107
read-sync-awake : func [ event [event! ] /local error] [
108
- sys/log/debug 'HTTP ["read -sync-awake:" event/type ]
108
+ sys/log/debug 'HTTP ["Read -sync-awake:" event/type ]
109
109
switch /default event/type [
110
110
connect ready [
111
111
do-request event/port
@@ -144,7 +144,7 @@ http-awake: func [event /local port http-port state awake res][
144
144
if any-function? : http-port/awake [state/awake: : http-port/awake ]
145
145
awake: : state/awake
146
146
147
- sys/log/debug 'HTTP ["awake :^[ [1m" event/type "^[ [22mstate:^[ [1m" state/state ]
147
+ sys/log/debug 'HTTP ["Awake :^[ [1m" event/type "^[ [22mstate:^[ [1m" state/state ]
148
148
149
149
switch /default event/type [
150
150
read [
@@ -255,7 +255,7 @@ do-request: func [
255
255
info/headers: info/response-line: info/response-parsed: port/data:
256
256
info/size: info/date: info/name: none
257
257
258
- sys/log/info 'HTTP ["do-request :^[ [22m" spec/method spec/host spec/path ]
258
+ sys/log/info 'HTTP ["Request :^[ [22m" spec/method spec/host spec/path ]
259
259
260
260
write port/state/connection make-http-request spec/method enhex any [spec/path %/ ] spec/headers spec/content
261
261
]
@@ -285,7 +285,7 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
285
285
all [
286
286
d1: find conn/data #{ 0A }
287
287
d2: find/tail d1 #{ 0A0A }
288
- sys/log/debug 'HTML "server using malformed line separator of #{0A0A}"
288
+ sys/log/debug 'HTML "Server using malformed line separator of #{0A0A}"
289
289
]
290
290
]
291
291
][
@@ -345,7 +345,7 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
345
345
]
346
346
]
347
347
348
- sys/log/debug 'HTTP ["check -response:" info/response-parsed ]
348
+ sys/log/debug 'HTTP ["Check -response:" info/response-parsed ]
349
349
350
350
;?? info/response-parsed
351
351
;?? spec/method
@@ -512,12 +512,12 @@ check-data: func [port /local headers res data out chunk-size mk1 mk2 trailer st
512
512
conn: state/connection
513
513
res: false
514
514
515
- sys/log/more 'HTTP ["check -data; bytes:^[ [m" length? conn/data ]
515
+ sys/log/more 'HTTP ["Check -data; bytes:^[ [m" length? conn/data ]
516
516
517
517
case [
518
518
headers/transfer-encoding = "chunked" [
519
519
data: conn/data
520
- sys/log/more 'HTTP ["chunked data: " length? data mold copy/part data 30 ]
520
+ sys/log/more 'HTTP ["Chunked data: " length? data mold copy/part data 30 ]
521
521
;clear the port data only at the beginning of the request --Richard
522
522
unless port/data [ port/data: make binary! 32000 ]
523
523
out: port/data
@@ -527,7 +527,7 @@ check-data: func [port /local headers res data out chunk-size mk1 mk2 trailer st
527
527
crlfbin mk1: to end
528
528
][
529
529
chunk-size: to integer! to issue! to string! chunk-size
530
- sys/log/more 'HTTP ["chunk -size:^[ [m" chunk-size]
530
+ sys/log/more 'HTTP ["Chunk -size:^[ [m" chunk-size]
531
531
either chunk-size = 0 [
532
532
if parse/all mk1 [
533
533
crlfbin (trailer: "" ) to end | copy trailer to crlf2bin to end
@@ -603,7 +603,7 @@ sys/make-scheme [
603
603
read : func [
604
604
port [port! ]
605
605
] [
606
- sys/log/debug 'HTTP "read "
606
+ sys/log/debug 'HTTP "READ "
607
607
either any-function? : port/awake [
608
608
unless open? port [cause-error 'Access 'not-open port/spec/ref ]
609
609
if port/state/state <> 'ready [http-error "Port not ready" ]
@@ -617,7 +617,7 @@ sys/make-scheme [
617
617
port [port! ]
618
618
value
619
619
] [
620
- sys/log/debug 'HTTP "write "
620
+ sys/log/debug 'HTTP "WRITE "
621
621
;?? port
622
622
unless any [block? :value binary? :value any-string? :value ][value: form :value ]
623
623
unless block? value [value: reduce [[Content-Type: "application/x-www-form-urlencoded; charset=utf-8" ] value]]
@@ -636,7 +636,7 @@ sys/make-scheme [
636
636
port [port! ]
637
637
/local conn
638
638
] [
639
- sys/log/debug 'HTTP ["open , state:" port/state ]
639
+ sys/log/debug 'HTTP ["OPEN , state:" port/state ]
640
640
if port/state [return port]
641
641
if none? port/spec/host [http-error "Missing host address" ]
642
642
port/state: context [
@@ -672,7 +672,7 @@ sys/make-scheme [
672
672
close : func [
673
673
port [port! ]
674
674
] [
675
- sys/log/debug 'HTTP "close "
675
+ sys/log/debug 'HTTP "CLOSE "
676
676
if port/state [
677
677
close port/state/connection
678
678
port/state/connection/awake: none
0 commit comments