diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2015-04-29 17:44:33 +0100 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2015-04-29 17:44:33 +0100 |
| commit | fbc1184c08d18d5ac0f8763a058e015e95353341 (patch) | |
| tree | f045cdfaaf13c35295d34cb0c2ffd7f4cf2ef30d /appl/svc/webget/http.b | |
| parent | 83eae27259078c96c074211a51bf38c774490544 (diff) | |
switch to Dial module
Diffstat (limited to 'appl/svc/webget/http.b')
| -rw-r--r-- | appl/svc/webget/http.b | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/appl/svc/webget/http.b b/appl/svc/webget/http.b index 0a4645ed..348084cf 100644 --- a/appl/svc/webget/http.b +++ b/appl/svc/webget/http.b @@ -23,6 +23,9 @@ include "url.m"; U: Url; ParsedUrl: import U; +include "dial.m"; + DI: Dial; + include "webget.m"; include "wgutils.m"; @@ -122,6 +125,7 @@ init(w: WebgetUtils) S = W->S; B = W->B; U = W->U; + DI = W->DI; ssl3 = nil; # load on demand readconfig(); } @@ -232,11 +236,11 @@ connect(c: ref Fid, r: ref Req, donec: chan of ref Fid) else port = HTTPD; } - addr := "tcp!" + dialu.host + "!" + port; + addr := DI->netmkaddr(dialu.host, "tcp", port); W->log(c, sys->sprint("http: dialing %s", addr)); - (ok, net) := sys->dial(addr, nil); - if(ok < 0) { + net := DI->dial(addr, nil); + if(net == nil) { mrep = W->usererr(r, sys->sprint("%r")); break redirloop; } |
