Skip to content

Commit

Permalink
FIX: using the new ENHEX function in HTTP protocol so it correctly ha…
Browse files Browse the repository at this point in the history
…ndles requests with unicode chars
  • Loading branch information
Oldes committed Jun 7, 2019
1 parent 295be23 commit 8215deb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/mezz/prot-http.r
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ do-request: func [
info/headers: info/response-line: info/response-parsed: port/data:
info/size: info/date: info/name: none

;sys/log/info 'HTTP ["do-request:^[[22m" spec/method spec/host spec/path]
sys/log/info 'HTTP ["do-request:^[[22m" spec/method spec/host spec/path]

write port/state/connection make-http-request spec/method to file! any [spec/path %/] spec/headers spec/content
write port/state/connection make-http-request spec/method enhex any [spec/path %/] spec/headers spec/content
]
parse-write-dialect: func [port block /local spec] [
spec: port/spec
Expand Down Expand Up @@ -636,6 +636,7 @@ sys/make-scheme [
port [port!]
/local conn
] [
? port/spec
sys/log/debug 'HTTP ["open, state:" port/state]
if port/state [return port]
if none? port/spec/host [http-error "Missing host address"]
Expand All @@ -661,6 +662,7 @@ sys/make-scheme [
sys/log/info 'HTTP ["Opening connection:^[[22m" conn/spec/ref]
;?? conn
open conn

port
]
open?: func [
Expand Down

0 comments on commit 8215deb

Please sign in to comment.