File tree 1 file changed +30
-20
lines changed
1 file changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,23 @@ REBOL [
30
30
digit: charset [#"0" - #"9" ]
31
31
alpha: charset [#"a" - #"z" #"A" - #"Z" ]
32
32
idate-to-date : function [ date [string! ]] [
33
- either parse date [
34
- 5 skip
35
- copy day: 2 digit
36
- space
37
- copy month: 3 alpha
38
- space
39
- copy year: 4 digit
40
- space
41
- copy time: to space
42
- space
43
- copy zone: to end
44
- ][
45
- if zone = "GMT" [zone: copy "+0" ]
46
- to date! rejoin [day "-" month "-" year "/" time zone]
47
- ][
48
- none
49
- ]
33
+ either parse date [
34
+ 5 skip
35
+ copy day: 2 digit
36
+ space
37
+ copy month: 3 alpha
38
+ space
39
+ copy year: 4 digit
40
+ space
41
+ copy time: to space
42
+ space
43
+ copy zone: to end
44
+ ][
45
+ if zone = "GMT" [zone: copy "+0" ]
46
+ to date! rejoin [day "-" month "-" year "/" time zone]
47
+ ][
48
+ none
49
+ ]
50
50
]
51
51
;@@==================================================
52
52
@@ -246,11 +246,21 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
246
246
spec: port/spec
247
247
248
248
;@@net-log ["[HTTP check-response]" info/response-parsed]
249
-
249
+
250
250
if all [
251
251
not headers
252
- d1: find conn/data crlfbin
253
- d2: find/tail d1 crlf2bin
252
+ any [
253
+ all [
254
+ d1: find conn/data crlfbin
255
+ d2: find/tail d1 crlf2bin
256
+ ;@@net-log "server using standard content separator of #{0D0A0D0A}"
257
+ ]
258
+ all [
259
+ d1: find conn/data #{ 0A }
260
+ d2: find/tail d1 #{ 0A0A }
261
+ ;@@net-log "server using malformed line separator of #{0A0A}"
262
+ ]
263
+ ]
254
264
] [
255
265
info/response-line: line: to string! copy/part conn/data d1
256
266
info/headers: headers: construct /with d1 http-response-headers
You can’t perform that action at this time.
0 commit comments