Skip to content

Commit

Permalink
Merge pull request rebol#113 (gchiu/patch-2) into community
Browse files Browse the repository at this point in the history
* gchiu/patch-2:
  do-redirect expects an absolute url so create one
  • Loading branch information
earl committed Jun 2, 2013
2 parents 24836e6 + 663bfe8 commit 7534d27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mezz/prot-http.r
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ http-response-headers: context [
do-redirect: func [port [port!] new-uri [url! string! file!] /local spec state] [
spec: port/spec
state: port/state
if #"/" = first new-uri [
new-uri: to url! ajoin [spec/scheme "://" spec/host new-uri]
]
new-uri: construct/with decode-url new-uri port/scheme/spec
if new-uri/scheme <> 'http [
state/error: make-http-error {Redirect to a protocol different from HTTP not supported}
Expand Down

0 comments on commit 7534d27

Please sign in to comment.