@@ -12,8 +12,8 @@ REBOL [
12
12
Licensed under the Apache License, Version 2.0
13
13
See: http://www.apache.org/licenses/LICENSE-2.0
14
14
}
15
- Version: 0.4.0
16
- Date: 4-Feb -2022
15
+ Version: 0.4.1
16
+ Date: 13-Jun -2022
17
17
File: %prot-http.r
18
18
Purpose: {
19
19
This program defines the HTTP protocol scheme for REBOL 3.
@@ -36,6 +36,7 @@ REBOL [
36
36
0.3.4 26-Feb-2020 "Oldes" "FIX: limit input data according Content-Length (#issues/2386)"
37
37
0.3.5 26-Oct-2020 "Oldes" "FEAT: support for read/part (using Range request with read/part/binary)"
38
38
0.4.0 04-Feb-2022 "Oldes" "FIX: situation when server does not provide Content-Length and just closes connection"
39
+ 0.4.1 13-Jun-2022 "Oldes" "FIX: Using `query` on URL sometimes reports `date: none`"
39
40
]
40
41
]
41
42
@@ -319,7 +320,7 @@ parse-write-dialect: func [port block /local spec][
319
320
[set block [any-string! | binary! | map! ] (spec/content: block) | (spec/content: none)]
320
321
]
321
322
]
322
- check-response : func [ port /local conn res headers d1 d2 line info state awake spec] [
323
+ check-response : func [ port /local conn res headers d1 d2 line info state awake spec date ] [
323
324
state: port/state
324
325
spec: port/spec
325
326
conn: state/connection
@@ -356,8 +357,14 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
356
357
][
357
358
awake make event! [type: 'error port: port]
358
359
]
359
- ; allow invalid date, but ignore it on error
360
- try [if headers/last-modified [info/date: to-date/utc headers/last-modified ]]
360
+ if date: any [
361
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/2496
362
+ select headers 'last-modified
363
+ select headers 'date
364
+ ][
365
+ ; allow invalid date, but ignore it on error
366
+ try [info/date: to-date/utc date]
367
+ ]
361
368
remove/part conn/data d2
362
369
state/state: 'reading-data
363
370
]
0 commit comments