@@ -278,8 +278,8 @@ do-request: func [
278
278
Accept: "*/*"
279
279
Accept-charset: "utf-8"
280
280
Accept-Encoding: "gzip,deflate"
281
- Host: either not find [80 443 ] spec/port-id [
282
- ajoin [spec/host #":" spec/port-id ]
281
+ Host: either not find [80 443 ] spec/port [
282
+ ajoin [spec/host #":" spec/port ]
283
283
][
284
284
form spec/host
285
285
]
@@ -508,22 +508,22 @@ do-redirect: func [port [port!] new-uri [url! string! file!] /local spec state h
508
508
do-request port
509
509
return true
510
510
]
511
- new-uri: as url! ajoin [spec/scheme "://" spec/host #":" spec/port-id new-uri]
511
+ new-uri: as url! ajoin [spec/scheme "://" spec/host #":" spec/port new-uri]
512
512
]
513
513
new-uri: decode-url new-uri
514
514
spec/headers/host: new-uri/host
515
515
516
- unless select new-uri 'port-id [
516
+ unless select new-uri 'port [
517
517
switch new-uri/scheme [
518
- 'https [append new-uri [port-id : 443 ]]
519
- 'http [append new-uri [port-id : 80 ]]
518
+ 'https [append new-uri [port: 443 ]]
519
+ 'http [append new-uri [port: 80 ]]
520
520
]
521
521
]
522
522
new-uri: construct /with new-uri port/scheme/spec
523
523
new-uri/method: spec/method
524
- new-uri/ref: as url! ajoin either find [#[none] 80 443 ] new-uri/port-id [
524
+ new-uri/ref: as url! ajoin either find [#[none] 80 443 ] new-uri/port [
525
525
[new-uri/scheme "://" new-uri/host new-uri/path ]
526
- ][ [new-uri/scheme "://" new-uri/host #":" new-uri/port-id new-uri/path ]]
526
+ ][ [new-uri/scheme "://" new-uri/host #":" new-uri/port new-uri/path ]]
527
527
528
528
unless find [http https] new-uri/scheme [
529
529
return throw-http-error port {Redirect to a protocol different from HTTP or HTTPS not supported}
@@ -783,12 +783,12 @@ sys/make-scheme [
783
783
chunk: none
784
784
chunk-size: none
785
785
]
786
- ;? port/state/info
786
+ spec: port/spec
787
787
port/state/connection: conn: make port! compose [
788
- scheme: (to lit-word! either port / spec/scheme = 'http ['tcp]['tls])
789
- host: port / spec/host
790
- port-id: port / spec/port-id
791
- ref: as url! ajoin [scheme "://" host #":" port-id ]
788
+ scheme: (to lit-word! either spec/scheme = 'http ['tcp]['tls])
789
+ host: spec/host
790
+ port: spec/port
791
+ ref: as url! ajoin [scheme "://" host #":" port]
792
792
]
793
793
794
794
conn/awake: :http-awake
@@ -877,6 +877,6 @@ sys/make-scheme/with [
877
877
name: 'https
878
878
title: "Secure HyperText Transport Protocol v1.1"
879
879
spec: make spec [
880
- port-id : 443
880
+ port: 443
881
881
]
882
882
] 'http
0 commit comments