mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
Merge pull request #1317 from urbit/eyre-iris
renames lighter-than-eyre vanes to %eyre and %iris
This commit is contained in:
commit
ca66511883
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:f90ed0c7ec18af3b3dad4e192dce2a43af97d5ed7070f57b1a535ef2d417aa33
|
oid sha256:0fc692ddfe9a7d869e8742e8cffa6f180c676e855d9e8ac185a372358125409f
|
||||||
size 7954772
|
size 8473572
|
||||||
|
@ -15,6 +15,18 @@ cleanup () {
|
|||||||
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
# update pill strategy to ensure correct staging
|
||||||
|
#
|
||||||
|
herb ./pier -p hood -d "+hood/mount /=home="
|
||||||
|
|
||||||
|
cp $ARVO/lib/pill.hoon ./pier/home/lib/
|
||||||
|
chmod -R u+rw ./pier/home/lib/
|
||||||
|
|
||||||
|
herb ./pier -p hood -d "+hood/commit %home"
|
||||||
|
herb ./pier -p hood -d "+hood/unmount %home"
|
||||||
|
|
||||||
|
# stage new desk for pill contents
|
||||||
|
#
|
||||||
herb ./pier -p hood -d '+hood/merge %stage our %home'
|
herb ./pier -p hood -d '+hood/merge %stage our %home'
|
||||||
herb ./pier -p hood -d "+hood/mount /=stage="
|
herb ./pier -p hood -d "+hood/mount /=stage="
|
||||||
|
|
||||||
@ -23,6 +35,7 @@ cp -r $ARVO ./pier/stage
|
|||||||
chmod -R u+rw ./pier/stage
|
chmod -R u+rw ./pier/stage
|
||||||
|
|
||||||
herb ./pier -p hood -d "+hood/commit %stage"
|
herb ./pier -p hood -d "+hood/commit %stage"
|
||||||
|
herb ./pier -p hood -d "+hood/unmount %stage"
|
||||||
|
|
||||||
herb ./pier -P solid.pill -d '+solid /=stage=/sys, =dub &'
|
herb ./pier -P solid.pill -d '+solid /=stage=/sys, =dub &'
|
||||||
|
|
||||||
|
@ -147,10 +147,10 @@
|
|||||||
:: +card: output effect payload
|
:: +card: output effect payload
|
||||||
::
|
::
|
||||||
+$ card
|
+$ card
|
||||||
$% [%connect wire =binding:http-server app=term]
|
$% [%connect wire =binding:eyre app=term]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%poke wire dock poke]
|
[%poke wire dock poke]
|
||||||
[%request wire request:http outbound-config:http-client]
|
[%request wire request:http outbound-config:iris]
|
||||||
[%rule wire %cert (unit [wain wain])]
|
[%rule wire %cert (unit [wain wain])]
|
||||||
[%wait wire @da]
|
[%wait wire @da]
|
||||||
==
|
==
|
||||||
@ -394,7 +394,7 @@
|
|||||||
++ request
|
++ request
|
||||||
|= [wir=wire req=hiss]
|
|= [wir=wire req=hiss]
|
||||||
^- card
|
^- card
|
||||||
[%request wir (hiss-to-request:html req) *outbound-config:http-client]
|
[%request wir (hiss-to-request:html req) *outbound-config:iris]
|
||||||
:: +signed-request: JWS JSON POST
|
:: +signed-request: JWS JSON POST
|
||||||
::
|
::
|
||||||
++ signed-request
|
++ signed-request
|
||||||
@ -1131,7 +1131,7 @@
|
|||||||
==
|
==
|
||||||
--
|
--
|
||||||
++ http-response
|
++ http-response
|
||||||
|= [=wire response=client-response:http-client]
|
|= [=wire response=client-response:iris]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
:: ignore progress reports
|
:: ignore progress reports
|
||||||
::
|
::
|
||||||
@ -1144,7 +1144,7 @@
|
|||||||
?: ?=(%cancel -.response)
|
?: ?=(%cancel -.response)
|
||||||
(retry:event t.wire)
|
(retry:event t.wire)
|
||||||
::
|
::
|
||||||
=/ rep=httr (to-httr:http-client +.response)
|
=/ rep=httr (to-httr:iris +.response)
|
||||||
:: add nonce to pool, if present
|
:: add nonce to pool, if present
|
||||||
::
|
::
|
||||||
=/ nonhed (skim q.rep |=((pair @t @t) ?=(%replay-nonce p)))
|
=/ nonhed (skim q.rep |=((pair @t @t) ?=(%replay-nonce p)))
|
||||||
@ -1193,7 +1193,7 @@
|
|||||||
:: Used to serve the domain validation challenge
|
:: Used to serve the domain validation challenge
|
||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
~& [%handle-http +<]
|
~& [%handle-http +<]
|
||||||
=/ url=(unit (pair pork:eyre quay:eyre))
|
=/ url=(unit (pair pork:eyre quay:eyre))
|
||||||
@ -1207,7 +1207,7 @@
|
|||||||
~| [%unknown-url url.request.inbound-request] !!
|
~| [%unknown-url url.request.inbound-request] !!
|
||||||
::
|
::
|
||||||
:: XX these crashes should be restored
|
:: XX these crashes should be restored
|
||||||
:: but %rver doesn't get an error notification from %gall
|
:: but %eyre doesn't get an error notification from %gall
|
||||||
::
|
::
|
||||||
:: ?. ?=(^ reg.act) ~|(%no-account !!)
|
:: ?. ?=(^ reg.act) ~|(%no-account !!)
|
||||||
:: ?. ?=(^ rod) ~|(%no-active-order !!)
|
:: ?. ?=(^ rod) ~|(%no-active-order !!)
|
||||||
@ -1315,7 +1315,7 @@
|
|||||||
:: +bound: response to %connect binding request
|
:: +bound: response to %connect binding request
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [=wire accepted=? =binding:http-server]
|
|= [=wire accepted=? =binding:eyre]
|
||||||
?: accepted
|
?: accepted
|
||||||
[~ this]
|
[~ this]
|
||||||
:: XX better error message
|
:: XX better error message
|
||||||
|
@ -477,7 +477,7 @@
|
|||||||
:: +bound: lient tells us we successfully bound our server to the ~chat url
|
:: +bound: lient tells us we successfully bound our server to the ~chat url
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -485,7 +485,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
=+ request-line=(parse-request-line url.request.inbound-request)
|
=+ request-line=(parse-request-line url.request.inbound-request)
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
+$ card
|
+$ card
|
||||||
$% [%poke wire dock poke]
|
$% [%poke wire dock poke]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%diff %json json]
|
[%diff %json json]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -32,7 +32,7 @@
|
|||||||
++ this .
|
++ this .
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -60,7 +60,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
=/ request-line (parse-request-line url.request.inbound-request)
|
=/ request-line (parse-request-line url.request.inbound-request)
|
||||||
=/ back-path (flop site.request-line)
|
=/ back-path (flop site.request-line)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
+$ in-poke-data
|
+$ in-poke-data
|
||||||
$% [%dns-authority =authority]
|
$% [%dns-authority =authority]
|
||||||
[%dns-bind =ship =target]
|
[%dns-bind =ship =target]
|
||||||
[%handle-http-request =inbound-request:http-server]
|
[%handle-http-request =inbound-request:eyre]
|
||||||
==
|
==
|
||||||
+$ out-poke-data
|
+$ out-poke-data
|
||||||
$% [%dns-bind =ship =target]
|
$% [%dns-bind =ship =target]
|
||||||
@ -62,7 +62,7 @@
|
|||||||
^- @t
|
^- @t
|
||||||
:: XX can't scry in +mule
|
:: XX can't scry in +mule
|
||||||
::
|
::
|
||||||
:: =/ =hart:eyre .^(hart:eyre %r /(scot %p our)/host/real)
|
:: =/ =hart:eyre .^(hart:eyre %e /(scot %p our)/host/real)
|
||||||
(crip (en-purl:html [hart [~ path] ~]))
|
(crip (en-purl:html [hart [~ path] ~]))
|
||||||
::
|
::
|
||||||
:: XX can't scry in +mule
|
:: XX can't scry in +mule
|
||||||
@ -821,7 +821,7 @@
|
|||||||
::
|
::
|
||||||
;< ~ bind:m
|
;< ~ bind:m
|
||||||
(send-request:stdio (retrieve-access-token:(oauth2-core bowl scry.pro.aut.nam) code))
|
(send-request:stdio (retrieve-access-token:(oauth2-core bowl scry.pro.aut.nam) code))
|
||||||
;< rep=(unit client-response:http-client) bind:m
|
;< rep=(unit client-response:iris) bind:m
|
||||||
take-maybe-response:stdio
|
take-maybe-response:stdio
|
||||||
:: XX retry
|
:: XX retry
|
||||||
::
|
::
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
++ card :: general card
|
++ card :: general card
|
||||||
$% {$diff $sole-effect sole-effect} ::
|
$% {$diff $sole-effect sole-effect} ::
|
||||||
{$send wire {ship term} clap} ::
|
{$send wire {ship term} clap} ::
|
||||||
[%request wire request:http outbound-config:http-client] :: %l
|
[%request wire request:http outbound-config:iris] :: %l
|
||||||
[%build wire ? schematic:ford]
|
[%build wire ? schematic:ford]
|
||||||
[%kill wire ~]
|
[%kill wire ~]
|
||||||
{$deal wire sock term club} ::
|
{$deal wire sock term club} ::
|
||||||
@ -363,7 +363,7 @@
|
|||||||
|= [way=wire =request:http]
|
|= [way=wire =request:http]
|
||||||
^+ +>+>
|
^+ +>+>
|
||||||
?> ?=(~ pux)
|
?> ?=(~ pux)
|
||||||
(he-card(poy `+>+<(pux `way)) %request way request *outbound-config:http-client)
|
(he-card(poy `+>+<(pux `way)) %request way request *outbound-config:iris)
|
||||||
::
|
::
|
||||||
++ dy-stop :: stop work
|
++ dy-stop :: stop work
|
||||||
^+ +>
|
^+ +>
|
||||||
@ -951,7 +951,7 @@
|
|||||||
:: +he-http-response: result from http-client
|
:: +he-http-response: result from http-client
|
||||||
::
|
::
|
||||||
++ he-http-response
|
++ he-http-response
|
||||||
|= [way=wire response=client-response:http-client]
|
|= [way=wire response=client-response:iris]
|
||||||
^+ +>
|
^+ +>
|
||||||
?> ?=(^ poy)
|
?> ?=(^ poy)
|
||||||
=< he-pine
|
=< he-pine
|
||||||
@ -960,7 +960,7 @@
|
|||||||
+>
|
+>
|
||||||
::
|
::
|
||||||
~! response
|
~! response
|
||||||
%. [%httr !>((to-httr:http-client response-header.response full-file.response))]
|
%. [%httr !>((to-httr:iris response-header.response full-file.response))]
|
||||||
=+ dye=~(. dy u.poy(pux ~))
|
=+ dye=~(. dy u.poy(pux ~))
|
||||||
?+ way !!
|
?+ way !!
|
||||||
{$hand ~} dy-hand:dye
|
{$hand ~} dy-hand:dye
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
^- move
|
^- move
|
||||||
[ost.bol %poke / [our.bol %hall] %hall-action a]
|
[ost.bol %poke / [our.bol %hall] %hall-action a]
|
||||||
::
|
::
|
||||||
++ ra-base-hart .^(hart:eyre %r /(scot %p our.bol)/host/(scot %da now.bol))
|
++ ra-base-hart .^(hart:eyre %e /(scot %p our.bol)/host/(scot %da now.bol))
|
||||||
::
|
::
|
||||||
++ poke-fora-post
|
++ poke-fora-post
|
||||||
|= {pax/path sup/spur hed/@t txt/@t}
|
|= {pax/path sup/spur hed/@t txt/@t}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
::
|
::
|
||||||
+$ card
|
+$ card
|
||||||
$% [%http-response =http-event:http]
|
$% [%http-response =http-event:http]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%peer wire dock path]
|
[%peer wire dock path]
|
||||||
[%diff %json json]
|
[%diff %json json]
|
||||||
==
|
==
|
||||||
@ -53,7 +53,7 @@
|
|||||||
[~ this(sta u.old)]
|
[~ this(sta u.old)]
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -110,7 +110,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
=+ request-line=(parse-request-line url.request.inbound-request)
|
=+ request-line=(parse-request-line url.request.inbound-request)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
:: +card: output effect payload
|
:: +card: output effect payload
|
||||||
::
|
::
|
||||||
+$ card
|
+$ card
|
||||||
$% [%connect wire binding:http-server term]
|
$% [%connect wire binding:eyre term]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%peel wire dock mark path]
|
[%peel wire dock mark path]
|
||||||
[%poke wire dock poke]
|
[%poke wire dock poke]
|
||||||
@ -41,13 +41,13 @@
|
|||||||
:: alerts us that we were bound. we need this because the vane calls back.
|
:: alerts us that we were bound. we need this because the vane calls back.
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bow move this)
|
%- (require-authorization:app ost.bow move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
?^ job.state
|
?^ job.state
|
||||||
:_ this
|
:_ this
|
||||||
@ -101,7 +101,7 @@
|
|||||||
:: +poke-handle-http-cancel: received when a connection was killed
|
:: +poke-handle-http-cancel: received when a connection was killed
|
||||||
::
|
::
|
||||||
++ poke-handle-http-cancel
|
++ poke-handle-http-cancel
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
:: the only long lived connections we keep state about are the stream ones.
|
:: the only long lived connections we keep state about are the stream ones.
|
||||||
::
|
::
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
:: +card: output effect payload
|
:: +card: output effect payload
|
||||||
::
|
::
|
||||||
+$ card
|
+$ card
|
||||||
$% [%connect wire binding:http-server term]
|
$% [%connect wire binding:eyre term]
|
||||||
[%disconnect wire binding:http-server]
|
[%disconnect wire binding:eyre]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
@ -28,7 +28,7 @@
|
|||||||
:: alerts us that we were bound. we need this because the vane calls back.
|
:: alerts us that we were bound. we need this because the vane calls back.
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -44,7 +44,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bow move this)
|
%- (require-authorization:app ost.bow move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[[ost.bow %http-response (js-response:app session-js)]~ this]
|
[[ost.bow %http-response (js-response:app session-js)]~ this]
|
||||||
::
|
::
|
||||||
|
@ -92,8 +92,8 @@
|
|||||||
::
|
::
|
||||||
++ require-authorization
|
++ require-authorization
|
||||||
|* [=bone move=mold this=*]
|
|* [=bone move=mold this=*]
|
||||||
|= handler=$-(inbound-request:http-server (quip move _this))
|
|= handler=$-(inbound-request:eyre (quip move _this))
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
?: authenticated.inbound-request
|
?: authenticated.inbound-request
|
||||||
@ -128,7 +128,7 @@
|
|||||||
:: alerts us that we were bound. we need this because the vane calls back.
|
:: alerts us that we were bound. we need this because the vane calls back.
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
~& [%bound success]
|
~& [%bound success]
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -160,7 +160,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization ost.bow move this)
|
%- (require-authorization ost.bow move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
=+ request-line=(parse-request-line url.request.inbound-request)
|
=+ request-line=(parse-request-line url.request.inbound-request)
|
||||||
@ -190,7 +190,7 @@
|
|||||||
:: +poke-handle-http-cancel: received when a connection was killed
|
:: +poke-handle-http-cancel: received when a connection was killed
|
||||||
::
|
::
|
||||||
++ poke-handle-http-cancel
|
++ poke-handle-http-cancel
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
:: the only long lived connections we keep state about are the stream ones.
|
:: the only long lived connections we keep state about are the stream ones.
|
||||||
::
|
::
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
+$ card
|
+$ card
|
||||||
$% [%poke wire dock poke]
|
$% [%poke wire dock poke]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%diff %json json]
|
[%diff %json json]
|
||||||
[%wait wire @da]
|
[%wait wire @da]
|
||||||
[%rest wire @da]
|
[%rest wire @da]
|
||||||
@ -37,7 +37,7 @@
|
|||||||
++ this .
|
++ this .
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -87,7 +87,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
=/ request-line (parse-request-line url.request.inbound-request)
|
=/ request-line (parse-request-line url.request.inbound-request)
|
||||||
=/ back-path (flop site.request-line)
|
=/ back-path (flop site.request-line)
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
$% [%poke wire dock poke]
|
$% [%poke wire dock poke]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%diff %json json]
|
[%diff %json json]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%request wire request:http outbound-config:http-client]
|
[%request wire request:http outbound-config:iris]
|
||||||
[%wait wire @da]
|
[%wait wire @da]
|
||||||
==
|
==
|
||||||
+$ poke
|
+$ poke
|
||||||
@ -38,7 +38,7 @@
|
|||||||
++ this .
|
++ this .
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -69,7 +69,7 @@
|
|||||||
[~ this]
|
[~ this]
|
||||||
=/ str/@t +.jon
|
=/ str/@t +.jon
|
||||||
=/ req/request:http (request-darksky str)
|
=/ req/request:http (request-darksky str)
|
||||||
=/ out *outbound-config:http-client
|
=/ out *outbound-config:iris
|
||||||
?~ timer
|
?~ timer
|
||||||
:- %+ weld
|
:- %+ weld
|
||||||
`(list move)`[ost.bol %wait /timer (add now.bol ~d1)]~
|
`(list move)`[ost.bol %wait /timer (add now.bol ~d1)]~
|
||||||
@ -101,12 +101,12 @@
|
|||||||
[bone %diff %json jon]
|
[bone %diff %json jon]
|
||||||
::
|
::
|
||||||
++ http-response
|
++ http-response
|
||||||
|= [=wire response=client-response:http-client]
|
|= [=wire response=client-response:iris]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
:: ignore all but %finished
|
:: ignore all but %finished
|
||||||
?. ?=(%finished -.response)
|
?. ?=(%finished -.response)
|
||||||
[~ this]
|
[~ this]
|
||||||
=/ data/(unit mime-data:http-client) full-file.response
|
=/ data/(unit mime-data:iris) full-file.response
|
||||||
?~ data
|
?~ data
|
||||||
:: data is null
|
:: data is null
|
||||||
[~ this]
|
[~ this]
|
||||||
@ -126,7 +126,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
=+ request-line=(parse-request-line url.request.inbound-request)
|
=+ request-line=(parse-request-line url.request.inbound-request)
|
||||||
=+ back-path=(flop site.request-line)
|
=+ back-path=(flop site.request-line)
|
||||||
@ -152,7 +152,7 @@
|
|||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
=/ req/request:http (request-darksky location)
|
=/ req/request:http (request-darksky location)
|
||||||
=/ lismov/(list move)
|
=/ lismov/(list move)
|
||||||
`(list move)`[ost.bol %request /[(scot %da now.bol)] req *outbound-config:http-client]~
|
`(list move)`[ost.bol %request /[(scot %da now.bol)] req *outbound-config:iris]~
|
||||||
?~ timer
|
?~ timer
|
||||||
:- (weld lismov `(list move)`[ost.bol %wait /timer (add now.bol ~h3)]~)
|
:- (weld lismov `(list move)`[ost.bol %wait /timer (add now.bol ~h3)]~)
|
||||||
this(timer `(add now.bol ~h3))
|
this(timer `(add now.bol ~h3))
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
[%diff diff]
|
[%diff diff]
|
||||||
[%build wire ? schematic:ford]
|
[%build wire ? schematic:ford]
|
||||||
[%kill wire ~]
|
[%kill wire ~]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%http-response http-event:http]
|
[%http-response http-event:http]
|
||||||
[%disconnect binding:http-server]
|
[%disconnect binding:eyre]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ poke
|
+$ poke
|
||||||
@ -1237,7 +1237,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [wir=wire success=? binding=binding:http-server]
|
|= [wir=wire success=? binding=binding:eyre]
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
@ -1245,7 +1245,7 @@
|
|||||||
::
|
::
|
||||||
++ poke-handle-http-request
|
++ poke-handle-http-request
|
||||||
%- (require-authorization:app ost.bol move this)
|
%- (require-authorization:app ost.bol move this)
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
=/ request-line (parse-request-line url.request.inbound-request)
|
=/ request-line (parse-request-line url.request.inbound-request)
|
||||||
@ -1431,7 +1431,7 @@
|
|||||||
:: +poke-handle-http-cancel: received when a connection was killed
|
:: +poke-handle-http-cancel: received when a connection was killed
|
||||||
::
|
::
|
||||||
++ poke-handle-http-cancel
|
++ poke-handle-http-cancel
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
[~ this]
|
[~ this]
|
||||||
::
|
::
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
=* our p.bec
|
=* our p.bec
|
||||||
:: XX must be evaluated outside tapp core due to +mule
|
:: XX must be evaluated outside tapp core due to +mule
|
||||||
::
|
::
|
||||||
=/ =hart:eyre .^(hart:eyre %r /(scot %p our)/host/real)
|
=/ =hart:eyre .^(hart:eyre %e /(scot %p our)/host/real)
|
||||||
:: XX terrible
|
:: XX terrible
|
||||||
=/ domain /com/googleapis
|
=/ domain /com/googleapis
|
||||||
=/ code
|
=/ code
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
::
|
::
|
||||||
+$ card
|
+$ card
|
||||||
$% [%http-response =http-event:http]
|
$% [%http-response =http-event:http]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%peer wire dock path]
|
[%peer wire dock path]
|
||||||
[%quit ~]
|
[%quit ~]
|
||||||
[%poke wire dock poke]
|
[%poke wire dock poke]
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
{$flog wire flog:dill} ::
|
{$flog wire flog:dill} ::
|
||||||
[%mint wire p=ship q=safe:rights:jael]
|
[%mint wire p=ship q=safe:rights:jael]
|
||||||
{$nuke wire ship} ::
|
{$nuke wire ship} ::
|
||||||
[%serve wire binding:http-server generator:http-server]
|
[%serve wire binding:eyre generator:eyre]
|
||||||
{$poke wire dock pear} ::
|
{$poke wire dock pear} ::
|
||||||
{$rest wire @da} ::
|
{$rest wire @da} ::
|
||||||
{$wait wire @da} ::
|
{$wait wire @da} ::
|
||||||
@ -218,11 +218,11 @@
|
|||||||
(emit %flog ~ %text "woot: {<[way cop]>}")
|
(emit %flog ~ %text "woot: {<[way cop]>}")
|
||||||
::
|
::
|
||||||
++ poke-serve
|
++ poke-serve
|
||||||
|= [=binding:http-server =generator:http-server] =< abet
|
|= [=binding:eyre =generator:eyre] =< abet
|
||||||
(emit %serve /helm/serv binding generator)
|
(emit %serve /helm/serv binding generator)
|
||||||
::
|
::
|
||||||
++ take-bound
|
++ take-bound
|
||||||
|= [wir=wire success=? binding=binding:http-server] =< abet
|
|= [wir=wire success=? binding=binding:eyre] =< abet
|
||||||
(emit %flog ~ %text "bound: {<success>}")
|
(emit %flog ~ %text "bound: {<success>}")
|
||||||
::
|
::
|
||||||
++ poke-tlon-init-stream
|
++ poke-tlon-init-stream
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
++ emit |=(a/card +>(..autoload (^emit a)))
|
++ emit |=(a/card +>(..autoload (^emit a)))
|
||||||
++ tracked-vanes
|
++ tracked-vanes
|
||||||
^- (list @tas)
|
^- (list @tas)
|
||||||
~[%ames %behn %clay %dill %ford %gall %jael %lient %rver]
|
~[%ames %behn %clay %dill %eyre %ford %gall %iris %jael]
|
||||||
::
|
::
|
||||||
++ our-home /(scot %p our)/home/(scot %da now)
|
++ our-home /(scot %p our)/home/(scot %da now)
|
||||||
++ sys-hash |=(pax/path .^(@uvI %cz :(welp our-home /sys pax)))
|
++ sys-hash |=(pax/path .^(@uvI %cz :(welp our-home /sys pax)))
|
||||||
|
@ -14,19 +14,6 @@
|
|||||||
:~ :: sys/zuse: standard library
|
:~ :: sys/zuse: standard library
|
||||||
::
|
::
|
||||||
[%$ /zuse]
|
[%$ /zuse]
|
||||||
:: TODO: I really want these to be named http-client and http-server,
|
|
||||||
:: but this interacts badly with every piece of the system which
|
|
||||||
:: assumes that vane names are one letter, and that one letter is the
|
|
||||||
:: first letter of the file. This assumption is threaded through way
|
|
||||||
:: too many places in the entire system to modify it while doing
|
|
||||||
:: something else.
|
|
||||||
::
|
|
||||||
:: sys/vane/lient: http client
|
|
||||||
::
|
|
||||||
[%l /vane/lient]
|
|
||||||
:: sys/vane/rver: http server
|
|
||||||
::
|
|
||||||
[%r /vane/rver]
|
|
||||||
:: sys/vane/ames: network
|
:: sys/vane/ames: network
|
||||||
::
|
::
|
||||||
[%a /vane/ames]
|
[%a /vane/ames]
|
||||||
@ -39,15 +26,18 @@
|
|||||||
:: sys/vane/dill: console
|
:: sys/vane/dill: console
|
||||||
::
|
::
|
||||||
[%d /vane/dill]
|
[%d /vane/dill]
|
||||||
:: sys/vane/eyre: web
|
:: sys/vane/eyre: http server
|
||||||
::
|
::
|
||||||
:: [%e /vane/eyre]
|
[%e /vane/eyre]
|
||||||
:: sys/vane/ford: build
|
:: sys/vane/ford: build
|
||||||
::
|
::
|
||||||
[%f /vane/ford]
|
[%f /vane/ford]
|
||||||
:: sys/vane/gall: applications
|
:: sys/vane/gall: applications
|
||||||
::
|
::
|
||||||
[%g /vane/gall]
|
[%g /vane/gall]
|
||||||
|
:: sys/vane/iris: http client
|
||||||
|
::
|
||||||
|
[%i /vane/iris]
|
||||||
:: sys/vane/jael: security
|
:: sys/vane/jael: security
|
||||||
::
|
::
|
||||||
[%j /vane/jael]
|
[%j /vane/jael]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
=, http-server
|
=, eyre
|
||||||
|%
|
|%
|
||||||
::
|
::
|
||||||
:: +parse-request-line: take a cord and parse out a url
|
:: +parse-request-line: take a cord and parse out a url
|
||||||
@ -25,8 +25,8 @@
|
|||||||
::
|
::
|
||||||
++ require-authorization
|
++ require-authorization
|
||||||
|* [=bone move=mold this=*]
|
|* [=bone move=mold this=*]
|
||||||
|= handler=$-(inbound-request:http-server (quip move _this))
|
|= handler=$-(inbound-request:eyre (quip move _this))
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- (quip move _this)
|
^- (quip move _this)
|
||||||
::
|
::
|
||||||
?: authenticated.inbound-request
|
?: authenticated.inbound-request
|
||||||
@ -79,7 +79,7 @@
|
|||||||
[%start [404 ~] ~ %.y]
|
[%start [404 ~] ~ %.y]
|
||||||
::
|
::
|
||||||
++ login-redirect
|
++ login-redirect
|
||||||
|= =inbound-request:http-server
|
|= =inbound-request:eyre
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
=/ redirect=cord
|
=/ redirect=cord
|
||||||
%- crip
|
%- crip
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
=/ m (async ,~)
|
=/ m (async ,~)
|
||||||
^- form:m
|
^- form:m
|
||||||
=/ =card
|
=/ =card
|
||||||
[%request / request *outbound-config:http-client]
|
[%request / request *outbound-config:iris]
|
||||||
;< ~ bind:m (send-raw-card card)
|
;< ~ bind:m (send-raw-card card)
|
||||||
(set-raw-contract & %request ~)
|
(set-raw-contract & %request ~)
|
||||||
::
|
::
|
||||||
@ -82,7 +82,7 @@
|
|||||||
:: Wait until we get an HTTP response or cancelation
|
:: Wait until we get an HTTP response or cancelation
|
||||||
::
|
::
|
||||||
++ take-response-raw
|
++ take-response-raw
|
||||||
=/ m (async (unit client-response:http-client))
|
=/ m (async (unit client-response:iris))
|
||||||
^- form:m
|
^- form:m
|
||||||
|= =async-input
|
|= =async-input
|
||||||
:^ ~ ~ ~
|
:^ ~ ~ ~
|
||||||
@ -108,9 +108,9 @@
|
|||||||
:: Wait until we get an HTTP response or cancelation and unset contract
|
:: Wait until we get an HTTP response or cancelation and unset contract
|
||||||
::
|
::
|
||||||
++ take-maybe-response
|
++ take-maybe-response
|
||||||
=/ m (async (unit client-response:http-client))
|
=/ m (async (unit client-response:iris))
|
||||||
^- form:m
|
^- form:m
|
||||||
;< rep=(unit client-response:http-client) bind:m
|
;< rep=(unit client-response:iris) bind:m
|
||||||
take-response-raw
|
take-response-raw
|
||||||
;< ~ bind:m (set-raw-contract | %request ~)
|
;< ~ bind:m (set-raw-contract | %request ~)
|
||||||
(pure:m rep)
|
(pure:m rep)
|
||||||
@ -118,9 +118,9 @@
|
|||||||
:: Wait until we get an HTTP response and unset contract
|
:: Wait until we get an HTTP response and unset contract
|
||||||
::
|
::
|
||||||
++ take-response
|
++ take-response
|
||||||
=/ m (async (unit client-response:http-client))
|
=/ m (async (unit client-response:iris))
|
||||||
^- form:m
|
^- form:m
|
||||||
;< rep=(unit client-response:http-client) bind:m
|
;< rep=(unit client-response:iris) bind:m
|
||||||
take-maybe-response
|
take-maybe-response
|
||||||
?^ rep
|
?^ rep
|
||||||
(pure:m rep)
|
(pure:m rep)
|
||||||
@ -132,7 +132,7 @@
|
|||||||
++ take-maybe-sigh
|
++ take-maybe-sigh
|
||||||
=/ m (async (unit httr:eyre))
|
=/ m (async (unit httr:eyre))
|
||||||
^- form:m
|
^- form:m
|
||||||
;< rep=(unit client-response:http-client) bind:m
|
;< rep=(unit client-response:iris) bind:m
|
||||||
take-maybe-response
|
take-maybe-response
|
||||||
?~ rep
|
?~ rep
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
@ -140,7 +140,7 @@
|
|||||||
::
|
::
|
||||||
?. ?=(%finished -.u.rep)
|
?. ?=(%finished -.u.rep)
|
||||||
(pure:m ~)
|
(pure:m ~)
|
||||||
(pure:m (some (to-httr:http-client +.u.rep)))
|
(pure:m (some (to-httr:iris +.u.rep)))
|
||||||
::
|
::
|
||||||
:: Wait until we get an HTTP response and unset contract
|
:: Wait until we get an HTTP response and unset contract
|
||||||
::
|
::
|
||||||
@ -198,7 +198,7 @@
|
|||||||
:: Incoming HTTP requests
|
:: Incoming HTTP requests
|
||||||
::
|
::
|
||||||
++ bind-route-raw
|
++ bind-route-raw
|
||||||
|= [=binding:http-server =term]
|
|= [=binding:eyre =term]
|
||||||
=/ m (async ,~)
|
=/ m (async ,~)
|
||||||
^- form:m
|
^- form:m
|
||||||
(send-raw-card [%connect / binding term])
|
(send-raw-card [%connect / binding term])
|
||||||
@ -216,7 +216,7 @@
|
|||||||
[%done success.sign]
|
[%done success.sign]
|
||||||
::
|
::
|
||||||
++ bind-route
|
++ bind-route
|
||||||
|= [=binding:http-server =term]
|
|= [=binding:eyre =term]
|
||||||
=/ m (async ?)
|
=/ m (async ?)
|
||||||
^- form:m
|
^- form:m
|
||||||
;< ~ bind:m (bind-route-raw binding term)
|
;< ~ bind:m (bind-route-raw binding term)
|
||||||
|
@ -380,7 +380,7 @@
|
|||||||
:: Pass response to async
|
:: Pass response to async
|
||||||
::
|
::
|
||||||
++ http-response
|
++ http-response
|
||||||
|= [=wire response=client-response:http-client]
|
|= [=wire response=client-response:iris]
|
||||||
^- (quip move _this-tapp)
|
^- (quip move _this-tapp)
|
||||||
(take-async bowl `[wire %http-response response])
|
(take-async bowl `[wire %http-response response])
|
||||||
::
|
::
|
||||||
@ -406,7 +406,7 @@
|
|||||||
:: Receive route binding notification
|
:: Receive route binding notification
|
||||||
::
|
::
|
||||||
++ bound
|
++ bound
|
||||||
|= [=wire success=? =binding:http-server]
|
|= [=wire success=? =binding:eyre]
|
||||||
^- (quip move _this-tapp)
|
^- (quip move _this-tapp)
|
||||||
(take-async bowl `[wire %bound success binding])
|
(take-async bowl `[wire %bound success binding])
|
||||||
::
|
::
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
:: Link from relative path
|
:: Link from relative path
|
||||||
=, eyre
|
=, eyre
|
||||||
=, html
|
=, html
|
||||||
=+ hok=.^(hart %r /(scot %p our)/host/real)
|
=+ hok=.^(hart %e /(scot %p our)/host/real)
|
||||||
=+ ref=|=(a/path (en-purl hok `(weld tub a) ~))
|
=+ ref=|=(a/path (en-purl hok `(weld tub a) ~))
|
||||||
:: urb:front attrs confuse RSS validators, readers
|
:: urb:front attrs confuse RSS validators, readers
|
||||||
=+ no-meta=|=(a/marl ^+(a ?~(a ~ ?.(?=($meta n.g.i.a) a $(a t.a)))))
|
=+ no-meta=|=(a/marl ^+(a ?~(a ~ ?.(?=($meta n.g.i.a) a $(a t.a)))))
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
[%peer wire dock path]
|
[%peer wire dock path]
|
||||||
[%pull wire dock ~]
|
[%pull wire dock ~]
|
||||||
[%diff out-peer-data]
|
[%diff out-peer-data]
|
||||||
[%request wire request:http outbound-config:http-client]
|
[%request wire request:http outbound-config:iris]
|
||||||
[%cancel-request wire ~]
|
[%cancel-request wire ~]
|
||||||
[%connect wire binding:http-server term]
|
[%connect wire binding:eyre term]
|
||||||
[%http-response =http-event:http]
|
[%http-response =http-event:http]
|
||||||
[%rule wire %turf %put turf]
|
[%rule wire %turf %put turf]
|
||||||
==
|
==
|
||||||
@ -24,8 +24,8 @@
|
|||||||
[%coup =dock error=(unit tang)]
|
[%coup =dock error=(unit tang)]
|
||||||
[%quit =dock =path]
|
[%quit =dock =path]
|
||||||
[%reap =dock =path error=(unit tang)]
|
[%reap =dock =path error=(unit tang)]
|
||||||
[%bound success=? =binding:http-server]
|
[%bound success=? =binding:eyre]
|
||||||
[%http-response response=client-response:http-client]
|
[%http-response response=client-response:iris]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: Outstanding contracts
|
:: Outstanding contracts
|
||||||
|
@ -466,8 +466,8 @@
|
|||||||
{@ $newt *} %a
|
{@ $newt *} %a
|
||||||
{@ $sync *} %c
|
{@ $sync *} %c
|
||||||
{@ $term *} %d
|
{@ $term *} %d
|
||||||
{@ $http-client *} %l
|
{@ $http-client *} %i
|
||||||
{@ $http-server *} %r
|
{@ $http-server *} %e
|
||||||
{@ $behn *} %b
|
{@ $behn *} %b
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
$: a/(unit mass) ::
|
$: a/(unit mass) ::
|
||||||
b/(unit mass) ::
|
b/(unit mass) ::
|
||||||
c/(unit mass) ::
|
c/(unit mass) ::
|
||||||
|
e/(unit mass) ::
|
||||||
f/(unit mass) ::
|
f/(unit mass) ::
|
||||||
g/(unit mass) ::
|
g/(unit mass) ::
|
||||||
|
i/(unit mass) ::
|
||||||
j/(unit mass) ::
|
j/(unit mass) ::
|
||||||
l/(unit mass) ::
|
|
||||||
r/(unit mass) ::
|
|
||||||
== ::
|
== ::
|
||||||
== ::
|
== ::
|
||||||
++ axon :: dill per duct
|
++ axon :: dill per duct
|
||||||
@ -63,6 +63,9 @@
|
|||||||
== ::
|
== ::
|
||||||
task:able:dill ::
|
task:able:dill ::
|
||||||
== ::
|
== ::
|
||||||
|
$: %e ::
|
||||||
|
$>(%wegh task:able:eyre) ::
|
||||||
|
== ::
|
||||||
$: %f ::
|
$: %f ::
|
||||||
$>(%wegh task:able:ford) ::
|
$>(%wegh task:able:ford) ::
|
||||||
== ::
|
== ::
|
||||||
@ -73,18 +76,15 @@
|
|||||||
== ::
|
== ::
|
||||||
task:able:gall ::
|
task:able:gall ::
|
||||||
== ::
|
== ::
|
||||||
|
$: %i ::
|
||||||
|
$>(%wegh task:able:iris) ::
|
||||||
|
== ::
|
||||||
$: %j ::
|
$: %j ::
|
||||||
$> $? %dawn ::
|
$> $? %dawn ::
|
||||||
%fake ::
|
%fake ::
|
||||||
%wegh ::
|
%wegh ::
|
||||||
== ::
|
== ::
|
||||||
task:able:jael ::
|
task:able:jael ::
|
||||||
== ::
|
|
||||||
$: %l ::
|
|
||||||
$>(%wegh task:able:http-client) ::
|
|
||||||
== ::
|
|
||||||
$: %r ::
|
|
||||||
$>(%wegh task:able:http-server) ::
|
|
||||||
== == ::
|
== == ::
|
||||||
++ sign :: in result $<-
|
++ sign :: in result $<-
|
||||||
$~ [%j %init *@p] ::
|
$~ [%j %init *@p] ::
|
||||||
@ -111,6 +111,9 @@
|
|||||||
$: %d ::
|
$: %d ::
|
||||||
$>(%blit gift:able:dill) ::
|
$>(%blit gift:able:dill) ::
|
||||||
== ::
|
== ::
|
||||||
|
$: %e ::
|
||||||
|
$>(%mass gift:able:eyre) ::
|
||||||
|
== ::
|
||||||
$: %f ::
|
$: %f ::
|
||||||
$>(%mass gift:able:ford) ::
|
$>(%mass gift:able:ford) ::
|
||||||
== ::
|
== ::
|
||||||
@ -121,17 +124,14 @@
|
|||||||
== ::
|
== ::
|
||||||
gift:able:gall ::
|
gift:able:gall ::
|
||||||
== ::
|
== ::
|
||||||
|
$: %i ::
|
||||||
|
$>(%mass gift:able:iris) ::
|
||||||
|
== ::
|
||||||
$: %j ::
|
$: %j ::
|
||||||
$> $? %init ::
|
$> $? %init ::
|
||||||
%mass ::
|
%mass ::
|
||||||
== ::
|
== ::
|
||||||
gift:able:jael ::
|
gift:able:jael ::
|
||||||
== ::
|
|
||||||
$: %l ::
|
|
||||||
$>(%mass gift:able:http-client) ::
|
|
||||||
== ::
|
|
||||||
$: %r ::
|
|
||||||
$>(%mass gift:able:http-server) ::
|
|
||||||
== == ::
|
== == ::
|
||||||
:::::::: :: dill tiles
|
:::::::: :: dill tiles
|
||||||
--
|
--
|
||||||
@ -279,11 +279,11 @@
|
|||||||
:* [hen %pass /heft/ames %a %wegh ~]
|
:* [hen %pass /heft/ames %a %wegh ~]
|
||||||
[hen %pass /heft/behn %b %wegh ~]
|
[hen %pass /heft/behn %b %wegh ~]
|
||||||
[hen %pass /heft/clay %c %wegh ~]
|
[hen %pass /heft/clay %c %wegh ~]
|
||||||
|
[hen %pass /heft/eyre %e %wegh ~]
|
||||||
[hen %pass /heft/ford %f %wegh ~]
|
[hen %pass /heft/ford %f %wegh ~]
|
||||||
[hen %pass /heft/gall %g %wegh ~]
|
[hen %pass /heft/gall %g %wegh ~]
|
||||||
|
[hen %pass /heft/iris %i %wegh ~]
|
||||||
[hen %pass /heft/jael %j %wegh ~]
|
[hen %pass /heft/jael %j %wegh ~]
|
||||||
[hen %pass /heft/lient %l %wegh ~]
|
|
||||||
[hen %pass /heft/rver %r %wegh ~]
|
|
||||||
moz
|
moz
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
@ -385,7 +385,7 @@
|
|||||||
|= sih/sign
|
|= sih/sign
|
||||||
^+ +>
|
^+ +>
|
||||||
?- sih
|
?- sih
|
||||||
{?($a $b $c $f $g $j $l $r) $mass *}
|
{?($a $b $c $e $f $g $i $j) $mass *}
|
||||||
(wegh -.sih p.sih)
|
(wegh -.sih p.sih)
|
||||||
::
|
::
|
||||||
{$a $nice *}
|
{$a $nice *}
|
||||||
@ -440,31 +440,31 @@
|
|||||||
:: +wegh: receive a memory report from a vane and maybe emit full report
|
:: +wegh: receive a memory report from a vane and maybe emit full report
|
||||||
::
|
::
|
||||||
++ wegh
|
++ wegh
|
||||||
|= {lal/?($a $b $c $f $g $j $l $r) mas/mass}
|
|= [lal=?(%a %b %c %e %f %g %i %j) mas=mass]
|
||||||
^+ +>
|
^+ +>
|
||||||
:: update our listing of vane responses with this new one
|
:: update our listing of vane responses with this new one
|
||||||
::
|
::
|
||||||
=. hef.all
|
=. hef.all
|
||||||
?- lal
|
?- lal
|
||||||
$a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
|
%a ~?(?=(^ a.hef.all) %double-mass-a hef.all(a `mas))
|
||||||
$b ~?(?=(^ b.hef.all) %double-mass-b hef.all(b `mas))
|
%b ~?(?=(^ b.hef.all) %double-mass-b hef.all(b `mas))
|
||||||
$c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
|
%c ~?(?=(^ c.hef.all) %double-mass-c hef.all(c `mas))
|
||||||
$f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
|
%e ~?(?=(^ e.hef.all) %double-mass-e hef.all(e `mas))
|
||||||
$g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
|
%f ~?(?=(^ f.hef.all) %double-mass-f hef.all(f `mas))
|
||||||
$j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
|
%g ~?(?=(^ g.hef.all) %double-mass-g hef.all(g `mas))
|
||||||
$l ~?(?=(^ l.hef.all) %double-mass-l hef.all(l `mas))
|
%i ~?(?=(^ i.hef.all) %double-mass-i hef.all(i `mas))
|
||||||
$r ~?(?=(^ r.hef.all) %double-mass-r hef.all(r `mas))
|
%j ~?(?=(^ j.hef.all) %double-mass-j hef.all(j `mas))
|
||||||
==
|
==
|
||||||
:: if not all vanes have responded yet, no-op
|
:: if not all vanes have responded yet, no-op
|
||||||
::
|
::
|
||||||
?. ?& ?=(^ a.hef.all)
|
?. ?& ?=(^ a.hef.all)
|
||||||
?=(^ b.hef.all)
|
?=(^ b.hef.all)
|
||||||
?=(^ c.hef.all)
|
?=(^ c.hef.all)
|
||||||
|
?=(^ e.hef.all)
|
||||||
?=(^ f.hef.all)
|
?=(^ f.hef.all)
|
||||||
?=(^ g.hef.all)
|
?=(^ g.hef.all)
|
||||||
|
?=(^ i.hef.all)
|
||||||
?=(^ j.hef.all)
|
?=(^ j.hef.all)
|
||||||
?=(^ l.hef.all)
|
|
||||||
?=(^ r.hef.all)
|
|
||||||
==
|
==
|
||||||
+>.$
|
+>.$
|
||||||
:: clear vane reports from our state before weighing ourself
|
:: clear vane reports from our state before weighing ourself
|
||||||
@ -472,7 +472,7 @@
|
|||||||
:: Otherwise, the state of vanes printed after this one get absorbed
|
:: Otherwise, the state of vanes printed after this one get absorbed
|
||||||
:: into Dill's %dot catchall report.
|
:: into Dill's %dot catchall report.
|
||||||
::
|
::
|
||||||
=/ ven=(list mass) ~[u.a u.b u.c u.g u.f u.j u.l u.r]:hef.all
|
=/ ven=(list mass) ~[u.a u.b u.c u.e u.f u.g u.i u.j]:hef.all
|
||||||
=> .(hef.all [~ ~ ~ ~ ~ ~ ~ ~])
|
=> .(hef.all [~ ~ ~ ~ ~ ~ ~ ~])
|
||||||
:: wegh ourself now that our state doesn't include other masses
|
:: wegh ourself now that our state doesn't include other masses
|
||||||
::
|
::
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
:: lighter than eyre
|
:: lighter than eyre
|
||||||
::
|
::
|
||||||
|= pit=vase
|
|= pit=vase
|
||||||
=, http-server
|
=, eyre
|
||||||
:: internal data structures
|
:: internal data structures
|
||||||
::
|
::
|
||||||
=> =~
|
=> =~
|
||||||
@ -1460,7 +1460,7 @@
|
|||||||
^- (list move)
|
^- (list move)
|
||||||
:_ moves
|
:_ moves
|
||||||
:+ p.state.u.channel %give
|
:+ p.state.u.channel %give
|
||||||
^- gift:able:http-server
|
^- gift:able
|
||||||
:* %response %continue
|
:* %response %continue
|
||||||
::
|
::
|
||||||
^= data
|
^= data
|
||||||
@ -1922,7 +1922,7 @@
|
|||||||
%give
|
%give
|
||||||
%mass
|
%mass
|
||||||
^- mass
|
^- mass
|
||||||
:+ %rver %|
|
:+ %eyre %|
|
||||||
:~ bindings+&+bindings.server-state.ax
|
:~ bindings+&+bindings.server-state.ax
|
||||||
auth+&+authentication-state.server-state.ax
|
auth+&+authentication-state.server-state.ax
|
||||||
connections+&+connections.server-state.ax
|
connections+&+connections.server-state.ax
|
@ -616,7 +616,7 @@
|
|||||||
:: $hiss `note-arvo`[%e %hiss +.q.q.cov]
|
:: $hiss `note-arvo`[%e %hiss +.q.q.cov]
|
||||||
$send `note-arvo`[%g %deal [our p.q.q.cov] q.q.q.cov]
|
$send `note-arvo`[%g %deal [our p.q.q.cov] q.q.q.cov]
|
||||||
$meta `note-arvo`[`@tas`p.q.q.cov %meta `vase`q.q.q.cov]
|
$meta `note-arvo`[`@tas`p.q.q.cov %meta `vase`q.q.q.cov]
|
||||||
:: $response `note-arvo`[%l %response raw-http-response.q.q.cov]
|
:: $response `note-arvo`[%i %response raw-http-response.q.q.cov]
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: I'm sort of stumped on how to get a %give out of the above; it's
|
:: I'm sort of stumped on how to get a %give out of the above; it's
|
||||||
@ -1342,12 +1342,12 @@
|
|||||||
%wind `%j
|
%wind `%j
|
||||||
%wipe `%f
|
%wipe `%f
|
||||||
::
|
::
|
||||||
%request `%l
|
%request `%i
|
||||||
%cancel-request `%l
|
%cancel-request `%i
|
||||||
%serve `%r
|
%serve `%e
|
||||||
%connect `%r
|
%connect `%e
|
||||||
%disconnect `%r
|
%disconnect `%e
|
||||||
%rule `%r
|
%rule `%e
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
:: http-client
|
:: http-client
|
||||||
::
|
::
|
||||||
|= pit=vase
|
|= pit=vase
|
||||||
=, http-client
|
=, iris
|
||||||
::
|
::
|
||||||
::
|
::
|
||||||
:: internal data structures
|
:: internal data structures
|
||||||
@ -146,7 +146,7 @@
|
|||||||
^- [(list move) ^state]
|
^- [(list move) ^state]
|
||||||
::
|
::
|
||||||
?~ cancel-id=(~(get by connection-by-duct.state) duct)
|
?~ cancel-id=(~(get by connection-by-duct.state) duct)
|
||||||
~& %invalid-lient-cancel
|
~& %iris-invalid-cancel
|
||||||
[~ state]
|
[~ state]
|
||||||
::
|
::
|
||||||
:- [outbound-duct.state %give %cancel-request u.cancel-id]~
|
:- [outbound-duct.state %give %cancel-request u.cancel-id]~
|
||||||
@ -365,7 +365,7 @@
|
|||||||
%give
|
%give
|
||||||
%mass
|
%mass
|
||||||
^- mass
|
^- mass
|
||||||
:+ %lient %|
|
:+ %iris %|
|
||||||
:~ nex+&+next-id.state.ax
|
:~ nex+&+next-id.state.ax
|
||||||
outbound+&+outbound-duct.state.ax
|
outbound+&+outbound-duct.state.ax
|
||||||
by-id+&+connection-by-id.state.ax
|
by-id+&+connection-by-id.state.ax
|
@ -110,12 +110,12 @@
|
|||||||
$: %a :: to %ames
|
$: %a :: to %ames
|
||||||
$>(%want task:able:ames) :: send message
|
$>(%want task:able:ames) :: send message
|
||||||
== ::
|
== ::
|
||||||
|
$: %i :: to %iris
|
||||||
|
$>(%request task:able:iris) :: http request
|
||||||
|
== ::
|
||||||
$: %j :: to self
|
$: %j :: to self
|
||||||
$>(%look task) :: set ethereum source
|
$>(%look task) :: set ethereum source
|
||||||
== ::
|
== ::
|
||||||
$: %l :: to %lient
|
|
||||||
$>(%request task:able:http-client) :: http request
|
|
||||||
== ::
|
|
||||||
$: @tas ::
|
$: @tas ::
|
||||||
$% $>(%init vane-task) :: report install
|
$% $>(%init vane-task) :: report install
|
||||||
$>(%sunk vane-task) :: report death
|
$>(%sunk vane-task) :: report death
|
||||||
@ -126,7 +126,7 @@
|
|||||||
$% [%b $>(%wake gift:able:behn)] :: wakeup
|
$% [%b $>(%wake gift:able:behn)] :: wakeup
|
||||||
[%j $>(%vent gift)] :: ethereum changes
|
[%j $>(%vent gift)] :: ethereum changes
|
||||||
[%a $>(%woot gift:able:ames)] :: message result
|
[%a $>(%woot gift:able:ames)] :: message result
|
||||||
[%l $>(%http-response gift:able:http-client)] :: http response
|
[%i $>(%http-response gift:able:iris)] :: http response
|
||||||
== ::
|
== ::
|
||||||
-- ::
|
-- ::
|
||||||
:: ::::
|
:: ::::
|
||||||
@ -758,7 +758,7 @@
|
|||||||
^- (list move)
|
^- (list move)
|
||||||
:~ [hen %pass /(scot %p our)/init %b %wait +(now)]
|
:~ [hen %pass /(scot %p our)/init %b %wait +(now)]
|
||||||
[hen %give %init our]
|
[hen %give %init our]
|
||||||
[hen %slip %r %init our]
|
[hen %slip %e %init our]
|
||||||
[hen %slip %d %init our]
|
[hen %slip %d %init our]
|
||||||
[hen %slip %g %init our]
|
[hen %slip %g %init our]
|
||||||
[hen %slip %c %init our]
|
[hen %slip %c %init our]
|
||||||
@ -807,7 +807,7 @@
|
|||||||
%+ weld moz
|
%+ weld moz
|
||||||
^- (list move)
|
^- (list move)
|
||||||
:~ [hen %give %init our]
|
:~ [hen %give %init our]
|
||||||
[hen %slip %r %init our]
|
[hen %slip %e %init our]
|
||||||
[hen %slip %d %init our]
|
[hen %slip %d %init our]
|
||||||
[hen %slip %g %init our]
|
[hen %slip %g %init our]
|
||||||
[hen %slip %c %init our]
|
[hen %slip %c %init our]
|
||||||
@ -1001,7 +1001,7 @@
|
|||||||
::TODO fail:et
|
::TODO fail:et
|
||||||
+>.$
|
+>.$
|
||||||
::
|
::
|
||||||
[%l %http-response *]
|
[%i %http-response *]
|
||||||
?. ?=(%finished -.client-response.hin)
|
?. ?=(%finished -.client-response.hin)
|
||||||
+>.$
|
+>.$
|
||||||
~! hin
|
~! hin
|
||||||
@ -1756,10 +1756,10 @@
|
|||||||
|= [wir=wire jon=json]
|
|= [wir=wire jon=json]
|
||||||
^- move
|
^- move
|
||||||
%+ wrap-note wir
|
%+ wrap-note wir
|
||||||
:^ %l %request
|
:^ %i %request
|
||||||
?> ?=(%| -.source)
|
?> ?=(%| -.source)
|
||||||
(light-json-request node.p.source jon)
|
(light-json-request node.p.source jon)
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
::
|
::
|
||||||
:: +| source-operations
|
:: +| source-operations
|
||||||
::
|
::
|
||||||
@ -1983,11 +1983,11 @@
|
|||||||
(complete-with-rpc-response cuz rep)
|
(complete-with-rpc-response cuz rep)
|
||||||
::
|
::
|
||||||
++ finished
|
++ finished
|
||||||
|= [cuz=wire =response-header:http full-file=(unit mime-data:http-client)]
|
|= [cuz=wire =response-header:http full-file=(unit mime-data:iris)]
|
||||||
^+ +>
|
^+ +>
|
||||||
?: ?=(%& -.source) +>
|
?: ?=(%& -.source) +>
|
||||||
::
|
::
|
||||||
=+ rep=(httr-to-rpc-response (to-httr:http-client response-header full-file))
|
=+ rep=(httr-to-rpc-response (to-httr:iris response-header full-file))
|
||||||
(complete-with-rpc-response cuz rep)
|
(complete-with-rpc-response cuz rep)
|
||||||
::
|
::
|
||||||
++ complete-with-rpc-response
|
++ complete-with-rpc-response
|
||||||
|
@ -270,7 +270,7 @@
|
|||||||
::
|
::
|
||||||
^- (list move)
|
^- (list move)
|
||||||
:~ [hen %give %init our]
|
:~ [hen %give %init our]
|
||||||
[hen %slip %r %init our]
|
[hen %slip %e %init our]
|
||||||
[hen %slip %d %init our]
|
[hen %slip %d %init our]
|
||||||
[hen %slip %g %init our]
|
[hen %slip %g %init our]
|
||||||
[hen %slip %c %init our]
|
[hen %slip %c %init our]
|
||||||
@ -321,7 +321,7 @@
|
|||||||
%+ weld moz
|
%+ weld moz
|
||||||
^- (list move)
|
^- (list move)
|
||||||
:~ [hen %give %init our]
|
:~ [hen %give %init our]
|
||||||
[hen %slip %r %init our]
|
[hen %slip %e %init our]
|
||||||
[hen %slip %d %init our]
|
[hen %slip %d %init our]
|
||||||
[hen %slip %g %init our]
|
[hen %slip %g %init our]
|
||||||
[hen %slip %c %init our]
|
[hen %slip %c %init our]
|
||||||
|
@ -864,16 +864,167 @@
|
|||||||
== ::
|
== ::
|
||||||
-- ::dill
|
-- ::dill
|
||||||
:: ::::
|
:: ::::
|
||||||
:::: ++eyre :: (1e) oldweb
|
:::: ++eyre :: (1e) http-server
|
||||||
:: ::::
|
:: ::::
|
||||||
++ eyre ^?
|
++ eyre ^?
|
||||||
|%
|
|%
|
||||||
++ bale :: driver state
|
++ able
|
||||||
|* a/_* :: %jael keys type
|
|%
|
||||||
$: {our/ship now/@da eny/@uvJ byk/beak} :: base info
|
++ gift
|
||||||
{usr/user dom/(list @t)} :: req user, domain
|
$% :: set-config: configures the external http server
|
||||||
key/a :: secrets from %jael
|
::
|
||||||
== ::
|
:: TODO: We need to actually return a (map (unit @t) http-config)
|
||||||
|
:: so we can apply configurations on a per-site basis
|
||||||
|
::
|
||||||
|
[%set-config =http-config]
|
||||||
|
:: response: response to an event from earth
|
||||||
|
::
|
||||||
|
[%response =http-event:http]
|
||||||
|
:: response to a %connect or %serve
|
||||||
|
::
|
||||||
|
:: :accepted is whether :binding was valid. Duplicate bindings are
|
||||||
|
:: not allowed.
|
||||||
|
::
|
||||||
|
[%bound accepted=? =binding]
|
||||||
|
:: memory usage report
|
||||||
|
::
|
||||||
|
[%mass p=mass]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ task
|
||||||
|
$~ [%vega ~]
|
||||||
|
$% :: event failure notification
|
||||||
|
::
|
||||||
|
$>(%crud vane-task)
|
||||||
|
:: initializes ourselves with an identity
|
||||||
|
::
|
||||||
|
$>(%init vane-task)
|
||||||
|
:: new unix process
|
||||||
|
::
|
||||||
|
$>(%born vane-task)
|
||||||
|
:: report upgrade
|
||||||
|
::
|
||||||
|
$>(%vega vane-task)
|
||||||
|
:: notifies us of the ports of our live http servers
|
||||||
|
::
|
||||||
|
[%live insecure=@ud secure=(unit @ud)]
|
||||||
|
:: update http configuration
|
||||||
|
::
|
||||||
|
[%rule =http-rule]
|
||||||
|
:: starts handling an inbound http request
|
||||||
|
::
|
||||||
|
[%request secure=? =address =request:http]
|
||||||
|
:: starts handling an backdoor http request
|
||||||
|
::
|
||||||
|
[%request-local secure=? =address =request:http]
|
||||||
|
:: cancels a previous request
|
||||||
|
::
|
||||||
|
[%cancel-request ~]
|
||||||
|
:: connects a binding to an app
|
||||||
|
::
|
||||||
|
[%connect =binding app=term]
|
||||||
|
:: connects a binding to a generator
|
||||||
|
::
|
||||||
|
[%serve =binding =generator]
|
||||||
|
:: disconnects a binding
|
||||||
|
::
|
||||||
|
:: This must be called with the same duct that made the binding in
|
||||||
|
:: the first place.
|
||||||
|
::
|
||||||
|
[%disconnect =binding]
|
||||||
|
:: memory usage request
|
||||||
|
::
|
||||||
|
$>(%wegh vane-task)
|
||||||
|
==
|
||||||
|
::
|
||||||
|
--
|
||||||
|
:: +binding: A rule to match a path.
|
||||||
|
::
|
||||||
|
:: A +binding is a system unique mapping for a path to match. A +binding
|
||||||
|
:: must be system unique because we don't want two handlers for a path;
|
||||||
|
:: what happens if there are two different actions for [~ /]?
|
||||||
|
::
|
||||||
|
+$ binding
|
||||||
|
$: :: site: the site to match.
|
||||||
|
::
|
||||||
|
:: A ~ will match the Urbit's identity site (your.urbit.org). Any
|
||||||
|
:: other value will match a domain literal.
|
||||||
|
::
|
||||||
|
site=(unit @t)
|
||||||
|
:: path: matches this prefix path
|
||||||
|
::
|
||||||
|
:: /~myapp will match /~myapp or /~myapp/longer/path
|
||||||
|
::
|
||||||
|
path=(list @t)
|
||||||
|
==
|
||||||
|
:: +generator: a generator on the local ship that handles requests
|
||||||
|
::
|
||||||
|
:: This refers to a generator on the local ship, run with a set of
|
||||||
|
:: arguments. Since http requests are time sensitive, we require that the
|
||||||
|
:: generator be on the current ship.
|
||||||
|
::
|
||||||
|
+$ generator
|
||||||
|
$: :: desk: desk on current ship that contains the generator
|
||||||
|
::
|
||||||
|
=desk
|
||||||
|
:: path: path on :desk to the generator's hoon file
|
||||||
|
::
|
||||||
|
path=(list @t)
|
||||||
|
:: args: arguments passed to the gate
|
||||||
|
::
|
||||||
|
args=*
|
||||||
|
==
|
||||||
|
:: +http-config: full http-server configuration
|
||||||
|
::
|
||||||
|
+$ http-config
|
||||||
|
$: :: secure: PEM-encoded RSA private key and cert or cert chain
|
||||||
|
::
|
||||||
|
secure=(unit [key=wain cert=wain])
|
||||||
|
:: proxy: reverse TCP proxy HTTP(s)
|
||||||
|
::
|
||||||
|
proxy=_|
|
||||||
|
:: log: keep HTTP(s) access logs
|
||||||
|
::
|
||||||
|
log=?
|
||||||
|
:: redirect: send 301 redirects to upgrade HTTP to HTTPS
|
||||||
|
::
|
||||||
|
:: Note: requires certificate.
|
||||||
|
::
|
||||||
|
redirect=?
|
||||||
|
==
|
||||||
|
:: +http-rule: update configuration
|
||||||
|
::
|
||||||
|
+$ http-rule
|
||||||
|
$% :: %cert: set or clear certificate and keypair
|
||||||
|
::
|
||||||
|
[%cert cert=(unit [key=wain cert=wain])]
|
||||||
|
:: %turf: add or remove established dns binding
|
||||||
|
::
|
||||||
|
[%turf action=?(%put %del) =turf]
|
||||||
|
==
|
||||||
|
:: +address: client IP address
|
||||||
|
::
|
||||||
|
+$ address
|
||||||
|
$% [%ipv4 @if]
|
||||||
|
[%ipv6 @is]
|
||||||
|
:: [%ames @p]
|
||||||
|
==
|
||||||
|
:: +inbound-request: +http-request and metadata
|
||||||
|
::
|
||||||
|
+$ inbound-request
|
||||||
|
$: :: authenticated: has a valid session cookie
|
||||||
|
::
|
||||||
|
authenticated=?
|
||||||
|
:: secure: whether this request was encrypted (https)
|
||||||
|
::
|
||||||
|
secure=?
|
||||||
|
:: address: the source address of this request
|
||||||
|
::
|
||||||
|
=address
|
||||||
|
:: request: the http-request itself
|
||||||
|
::
|
||||||
|
=request:http
|
||||||
|
==
|
||||||
::
|
::
|
||||||
++ cred :: credential
|
++ cred :: credential
|
||||||
$: hut/hart :: client host
|
$: hut/hart :: client host
|
||||||
@ -995,12 +1146,6 @@
|
|||||||
(gte i.b 224)
|
(gte i.b 224)
|
||||||
==
|
==
|
||||||
++ rout {p/(list host) q/path r/oryx s/path} :: http route (new)
|
++ rout {p/(list host) q/path r/oryx s/path} :: http route (new)
|
||||||
++ sec-move :: driver effect
|
|
||||||
$% {$send p/hiss} :: http out
|
|
||||||
{$show p/purl} :: direct user to url
|
|
||||||
{$give p/httr} :: respond immediately
|
|
||||||
{$redo ~} :: restart request qeu
|
|
||||||
== ::
|
|
||||||
++ user knot :: username
|
++ user knot :: username
|
||||||
-- ::eyre
|
-- ::eyre
|
||||||
:: ::::
|
:: ::::
|
||||||
@ -1793,6 +1938,119 @@
|
|||||||
++ suss (trel dude @tas @da) :: config report
|
++ suss (trel dude @tas @da) :: config report
|
||||||
++ well (pair desk term) ::
|
++ well (pair desk term) ::
|
||||||
-- ::gall
|
-- ::gall
|
||||||
|
:: %iris http-client interface
|
||||||
|
::
|
||||||
|
++ iris ^?
|
||||||
|
|%
|
||||||
|
++ able
|
||||||
|
|%
|
||||||
|
:: +gift: effects the client can emit
|
||||||
|
::
|
||||||
|
++ gift
|
||||||
|
$% :: %request: outbound http-request to earth
|
||||||
|
::
|
||||||
|
:: TODO: id is sort of wrong for this interface; the duct should
|
||||||
|
:: be enough to identify which request we're talking about?
|
||||||
|
::
|
||||||
|
[%request id=@ud request=request:http]
|
||||||
|
:: %cancel-request: tell earth to cancel a previous %request
|
||||||
|
::
|
||||||
|
[%cancel-request id=@ud]
|
||||||
|
:: %response: response to the caller
|
||||||
|
::
|
||||||
|
[%http-response =client-response]
|
||||||
|
:: memory usage report
|
||||||
|
::
|
||||||
|
[%mass p=mass]
|
||||||
|
==
|
||||||
|
::
|
||||||
|
++ task
|
||||||
|
$~ [%vega ~]
|
||||||
|
$% :: event failure notification
|
||||||
|
::
|
||||||
|
$>(%crud vane-task)
|
||||||
|
:: system started up; reset open connections
|
||||||
|
::
|
||||||
|
$>(%born vane-task)
|
||||||
|
:: report upgrade
|
||||||
|
::
|
||||||
|
$>(%vega vane-task)
|
||||||
|
:: fetches a remote resource
|
||||||
|
::
|
||||||
|
[%request =request:http =outbound-config]
|
||||||
|
:: cancels a previous fetch
|
||||||
|
::
|
||||||
|
[%cancel-request ~]
|
||||||
|
:: receives http data from outside
|
||||||
|
::
|
||||||
|
[%receive id=@ud =http-event:http]
|
||||||
|
:: memory usage request
|
||||||
|
::
|
||||||
|
$>(%wegh vane-task)
|
||||||
|
==
|
||||||
|
--
|
||||||
|
:: +client-response: one or more client responses given to the caller
|
||||||
|
::
|
||||||
|
+$ client-response
|
||||||
|
$% :: periodically sent as an update on the duct that sent %fetch
|
||||||
|
::
|
||||||
|
$: %progress
|
||||||
|
:: http-response-header: full transaction header
|
||||||
|
::
|
||||||
|
:: In case of a redirect chain, this is the target of the
|
||||||
|
:: final redirect.
|
||||||
|
::
|
||||||
|
=response-header:http
|
||||||
|
:: bytes-read: bytes fetched so far
|
||||||
|
::
|
||||||
|
bytes-read=@ud
|
||||||
|
:: expected-size: the total size if response had a content-length
|
||||||
|
::
|
||||||
|
expected-size=(unit @ud)
|
||||||
|
:: incremental: data received since the last %http-progress
|
||||||
|
::
|
||||||
|
incremental=(unit octs)
|
||||||
|
==
|
||||||
|
:: final response of a download, parsed as mime-data if successful
|
||||||
|
::
|
||||||
|
[%finished =response-header:http full-file=(unit mime-data)]
|
||||||
|
:: canceled by the runtime system
|
||||||
|
::
|
||||||
|
[%cancel ~]
|
||||||
|
==
|
||||||
|
:: mime-data: externally received but unvalidated mimed data
|
||||||
|
::
|
||||||
|
+$ mime-data
|
||||||
|
[type=@t data=octs]
|
||||||
|
:: +outbound-config: configuration for outbound http requests
|
||||||
|
::
|
||||||
|
+$ outbound-config
|
||||||
|
$: :: number of times to follow a 300 redirect before erroring
|
||||||
|
::
|
||||||
|
:: Common values for this will be 3 (the limit most browsers use), 5
|
||||||
|
:: (the limit recommended by the http standard), or 0 (let the
|
||||||
|
:: requester deal with 300 redirects).
|
||||||
|
::
|
||||||
|
redirects=_5
|
||||||
|
:: number of times to retry before failing
|
||||||
|
::
|
||||||
|
:: When we retry, we'll automatically try to use the 'Range' header
|
||||||
|
:: to resume the download where we left off if we have the
|
||||||
|
:: 'Accept-Range: bytes' in the original response.
|
||||||
|
::
|
||||||
|
retries=_3
|
||||||
|
==
|
||||||
|
:: +to-httr: adapts to old eyre interface
|
||||||
|
::
|
||||||
|
++ to-httr
|
||||||
|
|= [header=response-header:http full-file=(unit mime-data)]
|
||||||
|
^- httr:eyre
|
||||||
|
::
|
||||||
|
=/ data=(unit octs)
|
||||||
|
?~(full-file ~ `data.u.full-file)
|
||||||
|
::
|
||||||
|
[status-code.header headers.header data]
|
||||||
|
--
|
||||||
:: ::::
|
:: ::::
|
||||||
:::: ++jael :: (1h) security
|
:::: ++jael :: (1h) security
|
||||||
:: ::::
|
:: ::::
|
||||||
@ -2161,287 +2419,6 @@
|
|||||||
++ oath @ :: signature
|
++ oath @ :: signature
|
||||||
-- :: pki
|
-- :: pki
|
||||||
-- :: kale
|
-- :: kale
|
||||||
::
|
|
||||||
++ http-client ^?
|
|
||||||
|%
|
|
||||||
++ able
|
|
||||||
|%
|
|
||||||
:: +gift: effects the client can emit
|
|
||||||
::
|
|
||||||
++ gift
|
|
||||||
$% :: %request: outbound http-request to earth
|
|
||||||
::
|
|
||||||
:: TODO: id is sort of wrong for this interface; the duct should
|
|
||||||
:: be enough to identify which request we're talking about?
|
|
||||||
::
|
|
||||||
[%request id=@ud request=request:http]
|
|
||||||
:: %cancel-request: tell earth to cancel a previous %request
|
|
||||||
::
|
|
||||||
[%cancel-request id=@ud]
|
|
||||||
:: %response: response to the caller
|
|
||||||
::
|
|
||||||
[%http-response =client-response]
|
|
||||||
:: memory usage report
|
|
||||||
::
|
|
||||||
[%mass p=mass]
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ task
|
|
||||||
$~ [%vega ~]
|
|
||||||
$% :: event failure notification
|
|
||||||
::
|
|
||||||
$>(%crud vane-task)
|
|
||||||
:: system started up; reset open connections
|
|
||||||
::
|
|
||||||
$>(%born vane-task)
|
|
||||||
:: report upgrade
|
|
||||||
::
|
|
||||||
$>(%vega vane-task)
|
|
||||||
:: fetches a remote resource
|
|
||||||
::
|
|
||||||
[%request =request:http =outbound-config]
|
|
||||||
:: cancels a previous fetch
|
|
||||||
::
|
|
||||||
[%cancel-request ~]
|
|
||||||
:: receives http data from outside
|
|
||||||
::
|
|
||||||
[%receive id=@ud =http-event:http]
|
|
||||||
:: memory usage request
|
|
||||||
::
|
|
||||||
$>(%wegh vane-task)
|
|
||||||
==
|
|
||||||
--
|
|
||||||
:: +client-response: one or more client responses given to the caller
|
|
||||||
::
|
|
||||||
+$ client-response
|
|
||||||
$% :: periodically sent as an update on the duct that sent %fetch
|
|
||||||
::
|
|
||||||
$: %progress
|
|
||||||
:: http-response-header: full transaction header
|
|
||||||
::
|
|
||||||
:: In case of a redirect chain, this is the target of the
|
|
||||||
:: final redirect.
|
|
||||||
::
|
|
||||||
=response-header:http
|
|
||||||
:: bytes-read: bytes fetched so far
|
|
||||||
::
|
|
||||||
bytes-read=@ud
|
|
||||||
:: expected-size: the total size if response had a content-length
|
|
||||||
::
|
|
||||||
expected-size=(unit @ud)
|
|
||||||
:: incremental: data received since the last %http-progress
|
|
||||||
::
|
|
||||||
incremental=(unit octs)
|
|
||||||
==
|
|
||||||
:: final response of a download, parsed as mime-data if successful
|
|
||||||
::
|
|
||||||
[%finished =response-header:http full-file=(unit mime-data)]
|
|
||||||
:: canceled by the runtime system
|
|
||||||
::
|
|
||||||
[%cancel ~]
|
|
||||||
==
|
|
||||||
:: mime-data: externally received but unvalidated mimed data
|
|
||||||
::
|
|
||||||
+$ mime-data
|
|
||||||
[type=@t data=octs]
|
|
||||||
:: +outbound-config: configuration for outbound http requests
|
|
||||||
::
|
|
||||||
+$ outbound-config
|
|
||||||
$: :: number of times to follow a 300 redirect before erroring
|
|
||||||
::
|
|
||||||
:: Common values for this will be 3 (the limit most browsers use), 5
|
|
||||||
:: (the limit recommended by the http standard), or 0 (let the
|
|
||||||
:: requester deal with 300 redirects).
|
|
||||||
::
|
|
||||||
redirects=_5
|
|
||||||
:: number of times to retry before failing
|
|
||||||
::
|
|
||||||
:: When we retry, we'll automatically try to use the 'Range' header
|
|
||||||
:: to resume the download where we left off if we have the
|
|
||||||
:: 'Accept-Range: bytes' in the original response.
|
|
||||||
::
|
|
||||||
retries=_3
|
|
||||||
==
|
|
||||||
:: +to-httr: adapts to old eyre interface
|
|
||||||
::
|
|
||||||
++ to-httr
|
|
||||||
|= [header=response-header:http full-file=(unit mime-data)]
|
|
||||||
^- httr:eyre
|
|
||||||
::
|
|
||||||
=/ data=(unit octs)
|
|
||||||
?~(full-file ~ `data.u.full-file)
|
|
||||||
::
|
|
||||||
[status-code.header headers.header data]
|
|
||||||
--
|
|
||||||
::
|
|
||||||
::::
|
|
||||||
::
|
|
||||||
++ http-server ^?
|
|
||||||
|%
|
|
||||||
++ able
|
|
||||||
|%
|
|
||||||
++ gift
|
|
||||||
$% :: set-config: configures the external http server
|
|
||||||
::
|
|
||||||
:: TODO: We need to actually return a (map (unit @t) http-config)
|
|
||||||
:: so we can apply configurations on a per-site basis
|
|
||||||
::
|
|
||||||
[%set-config =http-config]
|
|
||||||
:: response: response to an event from earth
|
|
||||||
::
|
|
||||||
[%response =http-event:http]
|
|
||||||
:: response to a %connect or %serve
|
|
||||||
::
|
|
||||||
:: :accepted is whether :binding was valid. Duplicate bindings are
|
|
||||||
:: not allowed.
|
|
||||||
::
|
|
||||||
[%bound accepted=? =binding]
|
|
||||||
:: memory usage report
|
|
||||||
::
|
|
||||||
[%mass p=mass]
|
|
||||||
==
|
|
||||||
::
|
|
||||||
++ task
|
|
||||||
$~ [%vega ~]
|
|
||||||
$% :: event failure notification
|
|
||||||
::
|
|
||||||
$>(%crud vane-task)
|
|
||||||
:: initializes ourselves with an identity
|
|
||||||
::
|
|
||||||
$>(%init vane-task)
|
|
||||||
:: new unix process
|
|
||||||
::
|
|
||||||
:: XX use +vane-task
|
|
||||||
::
|
|
||||||
[%born p=(list host)]
|
|
||||||
:: report upgrade
|
|
||||||
::
|
|
||||||
$>(%vega vane-task)
|
|
||||||
:: notifies us of the ports of our live http servers
|
|
||||||
::
|
|
||||||
[%live insecure=@ud secure=(unit @ud)]
|
|
||||||
:: update http configuration
|
|
||||||
::
|
|
||||||
[%rule =http-rule]
|
|
||||||
:: starts handling an inbound http request
|
|
||||||
::
|
|
||||||
[%request secure=? =address =request:http]
|
|
||||||
:: starts handling an backdoor http request
|
|
||||||
::
|
|
||||||
[%request-local secure=? =address =request:http]
|
|
||||||
:: cancels a previous request
|
|
||||||
::
|
|
||||||
[%cancel-request ~]
|
|
||||||
:: connects a binding to an app
|
|
||||||
::
|
|
||||||
[%connect =binding app=term]
|
|
||||||
:: connects a binding to a generator
|
|
||||||
::
|
|
||||||
[%serve =binding =generator]
|
|
||||||
:: disconnects a binding
|
|
||||||
::
|
|
||||||
:: This must be called with the same duct that made the binding in
|
|
||||||
:: the first place.
|
|
||||||
::
|
|
||||||
[%disconnect =binding]
|
|
||||||
:: memory usage request
|
|
||||||
::
|
|
||||||
$>(%wegh vane-task)
|
|
||||||
==
|
|
||||||
::
|
|
||||||
--
|
|
||||||
:: +binding: A rule to match a path.
|
|
||||||
::
|
|
||||||
:: A +binding is a system unique mapping for a path to match. A +binding
|
|
||||||
:: must be system unique because we don't want two handlers for a path;
|
|
||||||
:: what happens if there are two different actions for [~ /]?
|
|
||||||
::
|
|
||||||
+$ binding
|
|
||||||
$: :: site: the site to match.
|
|
||||||
::
|
|
||||||
:: A ~ will match the Urbit's identity site (your.urbit.org). Any
|
|
||||||
:: other value will match a domain literal.
|
|
||||||
::
|
|
||||||
site=(unit @t)
|
|
||||||
:: path: matches this prefix path
|
|
||||||
::
|
|
||||||
:: /~myapp will match /~myapp or /~myapp/longer/path
|
|
||||||
::
|
|
||||||
path=(list @t)
|
|
||||||
==
|
|
||||||
:: +generator: a generator on the local ship that handles requests
|
|
||||||
::
|
|
||||||
:: This refers to a generator on the local ship, run with a set of
|
|
||||||
:: arguments. Since http requests are time sensitive, we require that the
|
|
||||||
:: generator be on the current ship.
|
|
||||||
::
|
|
||||||
+$ generator
|
|
||||||
$: :: desk: desk on current ship that contains the generator
|
|
||||||
::
|
|
||||||
=desk
|
|
||||||
:: path: path on :desk to the generator's hoon file
|
|
||||||
::
|
|
||||||
path=(list @t)
|
|
||||||
:: args: arguments passed to the gate
|
|
||||||
::
|
|
||||||
args=*
|
|
||||||
==
|
|
||||||
:: +host: http host
|
|
||||||
::
|
|
||||||
+$ host
|
|
||||||
(each (list @t) @if)
|
|
||||||
:: +http-config: full http-server configuration
|
|
||||||
::
|
|
||||||
+$ http-config
|
|
||||||
$: :: secure: PEM-encoded RSA private key and cert or cert chain
|
|
||||||
::
|
|
||||||
secure=(unit [key=wain cert=wain])
|
|
||||||
:: proxy: reverse TCP proxy HTTP(s)
|
|
||||||
::
|
|
||||||
proxy=_|
|
|
||||||
:: log: keep HTTP(s) access logs
|
|
||||||
::
|
|
||||||
log=?
|
|
||||||
:: redirect: send 301 redirects to upgrade HTTP to HTTPS
|
|
||||||
::
|
|
||||||
:: Note: requires certificate.
|
|
||||||
::
|
|
||||||
redirect=?
|
|
||||||
==
|
|
||||||
:: +http-rule: update configuration
|
|
||||||
::
|
|
||||||
+$ http-rule
|
|
||||||
$% :: %cert: set or clear certificate and keypair
|
|
||||||
::
|
|
||||||
[%cert cert=(unit [key=wain cert=wain])]
|
|
||||||
:: %turf: add or remove established dns binding
|
|
||||||
::
|
|
||||||
[%turf action=?(%put %del) =turf]
|
|
||||||
==
|
|
||||||
:: +address: client IP address
|
|
||||||
::
|
|
||||||
+$ address
|
|
||||||
$% [%ipv4 @if]
|
|
||||||
[%ipv6 @is]
|
|
||||||
:: [%ames @p]
|
|
||||||
==
|
|
||||||
:: +inbound-request: +http-request and metadata
|
|
||||||
::
|
|
||||||
+$ inbound-request
|
|
||||||
$: :: authenticated: has a valid session cookie
|
|
||||||
::
|
|
||||||
authenticated=?
|
|
||||||
:: secure: whether this request was encrypted (https)
|
|
||||||
::
|
|
||||||
secure=?
|
|
||||||
:: address: the source address of this request
|
|
||||||
::
|
|
||||||
=address
|
|
||||||
:: request: the http-request itself
|
|
||||||
::
|
|
||||||
=request:http
|
|
||||||
==
|
|
||||||
--
|
|
||||||
:: ::::
|
:: ::::
|
||||||
:::: ++xmas :: (1i) new network
|
:::: ++xmas :: (1i) new network
|
||||||
:: ::::
|
:: ::::
|
||||||
@ -7600,22 +7577,22 @@
|
|||||||
gift:able:behn
|
gift:able:behn
|
||||||
gift:able:clay
|
gift:able:clay
|
||||||
gift:able:dill
|
gift:able:dill
|
||||||
|
gift:able:eyre
|
||||||
gift:able:ford
|
gift:able:ford
|
||||||
gift:able:gall
|
gift:able:gall
|
||||||
|
gift:able:iris
|
||||||
gift:able:jael
|
gift:able:jael
|
||||||
gift:able:http-client
|
|
||||||
gift:able:http-server
|
|
||||||
==
|
==
|
||||||
++ task-arvo :: in request ->$
|
++ task-arvo :: in request ->$
|
||||||
$% task:able:ames
|
$% task:able:ames
|
||||||
task:able:clay
|
task:able:clay
|
||||||
task:able:behn
|
task:able:behn
|
||||||
task:able:dill
|
task:able:dill
|
||||||
|
task:able:iris
|
||||||
task:able:ford
|
task:able:ford
|
||||||
task:able:gall
|
task:able:gall
|
||||||
|
task:able:eyre
|
||||||
task:able:jael
|
task:able:jael
|
||||||
task:able:http-client
|
|
||||||
task:able:http-server
|
|
||||||
==
|
==
|
||||||
++ note-arvo :: out request $->
|
++ note-arvo :: out request $->
|
||||||
$~ [%a %wake ~]
|
$~ [%a %wake ~]
|
||||||
@ -7623,11 +7600,11 @@
|
|||||||
{$b task:able:behn}
|
{$b task:able:behn}
|
||||||
{$c task:able:clay}
|
{$c task:able:clay}
|
||||||
{$d task:able:dill}
|
{$d task:able:dill}
|
||||||
|
[%e task:able:eyre]
|
||||||
{$f task:able:ford}
|
{$f task:able:ford}
|
||||||
{$g task:able:gall}
|
{$g task:able:gall}
|
||||||
|
[%i task:able:iris]
|
||||||
{$j task:able:jael}
|
{$j task:able:jael}
|
||||||
[%l task:able:http-client]
|
|
||||||
[%r task:able:http-server]
|
|
||||||
{@tas $meta vase}
|
{@tas $meta vase}
|
||||||
==
|
==
|
||||||
++ sign-arvo :: in result $<-
|
++ sign-arvo :: in result $<-
|
||||||
@ -7640,10 +7617,10 @@
|
|||||||
{$c gift:able:clay}
|
{$c gift:able:clay}
|
||||||
{$d gift:able:dill}
|
{$d gift:able:dill}
|
||||||
{$f gift:able:ford}
|
{$f gift:able:ford}
|
||||||
|
[%e gift:able:eyre]
|
||||||
{$g gift:able:gall}
|
{$g gift:able:gall}
|
||||||
|
[%i gift:able:iris]
|
||||||
{$j gift:able:jael}
|
{$j gift:able:jael}
|
||||||
[%l gift:able:http-client]
|
|
||||||
[%r gift:able:http-server]
|
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
+$ unix-task :: input from unix
|
+$ unix-task :: input from unix
|
||||||
@ -7660,12 +7637,10 @@
|
|||||||
:: %clay: new process
|
:: %clay: new process
|
||||||
::
|
::
|
||||||
$>(%boat task:able:clay)
|
$>(%boat task:able:clay)
|
||||||
:: %behn/%lient/%rver: new process
|
:: %behn/%eyre/%iris: new process
|
||||||
::
|
|
||||||
:: XX %rver includes payload
|
|
||||||
::
|
::
|
||||||
$>(%born vane-task)
|
$>(%born vane-task)
|
||||||
:: %rver: cancel request
|
:: %eyre: cancel request
|
||||||
::
|
::
|
||||||
[%cancel-request ~]
|
[%cancel-request ~]
|
||||||
:: any vane: error report
|
:: any vane: error report
|
||||||
@ -7683,18 +7658,18 @@
|
|||||||
:: %clay: external edit
|
:: %clay: external edit
|
||||||
::
|
::
|
||||||
$>(%into task:able:clay)
|
$>(%into task:able:clay)
|
||||||
:: %rver: learn ports of live http servers
|
:: %eyre: learn ports of live http servers
|
||||||
::
|
::
|
||||||
$>(%live task:able:http-server)
|
$>(%live task:able:eyre)
|
||||||
:: %lient: hear (partial) http response
|
:: %iris: hear (partial) http response
|
||||||
::
|
::
|
||||||
$>(%receive task:able:http-client)
|
$>(%receive task:able:iris)
|
||||||
:: %rver: starts handling an inbound http request
|
:: %eyre: starts handling an inbound http request
|
||||||
::
|
::
|
||||||
$>(%request task:able:http-server)
|
$>(%request task:able:eyre)
|
||||||
:: %rver: starts handling an backdoor http request
|
:: %eyre: starts handling an backdoor http request
|
||||||
::
|
::
|
||||||
$>(%request-local task:able:http-server)
|
$>(%request-local task:able:eyre)
|
||||||
:: %behn: wakeup
|
:: %behn: wakeup
|
||||||
::
|
::
|
||||||
$>(%wake task:able:behn)
|
$>(%wake task:able:behn)
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
%request
|
%request
|
||||||
/acme/try/2/directory
|
/acme/try/2/directory
|
||||||
[%'GET' (crip (en-purl:html directory-base:app)) ~ ~]
|
[%'GET' (crip (en-purl:html directory-base:app)) ~ ~]
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
== ==
|
== ==
|
||||||
!> moves
|
!> moves
|
||||||
--
|
--
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/+ *test, *test-ford
|
/+ *test, *test-ford
|
||||||
::
|
::
|
||||||
/= http-server-raw /: /===/sys/vane/rver /!noun/
|
/= http-server-raw /: /===/sys/vane/eyre /!noun/
|
||||||
::
|
::
|
||||||
!:
|
!:
|
||||||
::
|
::
|
@ -1,6 +1,6 @@
|
|||||||
/+ *test
|
/+ *test
|
||||||
::
|
::
|
||||||
/= http-client-raw /: /===/sys/vane/lient /!noun/
|
/= http-client-raw /: /===/sys/vane/iris /!noun/
|
||||||
::
|
::
|
||||||
!:
|
!:
|
||||||
::
|
::
|
||||||
@ -39,7 +39,7 @@
|
|||||||
:* duct=~[/http-get-request] ~
|
:* duct=~[/http-get-request] ~
|
||||||
%request
|
%request
|
||||||
request
|
request
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
==
|
==
|
||||||
^= expected-moves
|
^= expected-moves
|
||||||
^- (list move:http-client-gate)
|
^- (list move:http-client-gate)
|
||||||
@ -61,7 +61,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -135,7 +135,7 @@
|
|||||||
:* duct=~[/http-get-request] ~
|
:* duct=~[/http-get-request] ~
|
||||||
%request
|
%request
|
||||||
request
|
request
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
==
|
==
|
||||||
^= expected-moves
|
^= expected-moves
|
||||||
^- (list move:http-client-gate)
|
^- (list move:http-client-gate)
|
||||||
@ -157,7 +157,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -194,7 +194,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -227,7 +227,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -292,7 +292,7 @@
|
|||||||
:* duct=~[/http-get-request] ~
|
:* duct=~[/http-get-request] ~
|
||||||
%request
|
%request
|
||||||
request
|
request
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
==
|
==
|
||||||
^= expected-moves
|
^= expected-moves
|
||||||
^- (list move:http-client-gate)
|
^- (list move:http-client-gate)
|
||||||
@ -314,7 +314,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -398,7 +398,7 @@
|
|||||||
:* duct=~[/http-get-request] ~
|
:* duct=~[/http-get-request] ~
|
||||||
%request
|
%request
|
||||||
request
|
request
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
==
|
==
|
||||||
^= expected-moves
|
^= expected-moves
|
||||||
^- (list move:http-client-gate)
|
^- (list move:http-client-gate)
|
||||||
@ -420,7 +420,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/initial-born-duct] ~
|
:+ duct=~[/initial-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %receive
|
:* %receive
|
||||||
id=0
|
id=0
|
||||||
^- http-event:http
|
^- http-event:http
|
||||||
@ -471,7 +471,7 @@
|
|||||||
:* duct=~[/http-get-request] ~
|
:* duct=~[/http-get-request] ~
|
||||||
%request
|
%request
|
||||||
request
|
request
|
||||||
*outbound-config:http-client
|
*outbound-config:iris
|
||||||
==
|
==
|
||||||
^= expected-moves
|
^= expected-moves
|
||||||
^- (list move:http-client-gate)
|
^- (list move:http-client-gate)
|
||||||
@ -492,7 +492,7 @@
|
|||||||
scry=*sley
|
scry=*sley
|
||||||
^= call-args
|
^= call-args
|
||||||
:+ duct=~[/secondary-born-duct] ~
|
:+ duct=~[/secondary-born-duct] ~
|
||||||
^- task:able:http-client
|
^- task:able:iris
|
||||||
:* %born
|
:* %born
|
||||||
~
|
~
|
||||||
==
|
==
|
||||||
@ -515,7 +515,7 @@
|
|||||||
|= $: http-client-gate=_http-client-gate
|
|= $: http-client-gate=_http-client-gate
|
||||||
now=@da
|
now=@da
|
||||||
scry=sley
|
scry=sley
|
||||||
call-args=[=duct type=* wrapped-task=(hobo task:able:http-client)]
|
call-args=[=duct type=* wrapped-task=(hobo task:able:iris)]
|
||||||
expected-moves=(list move:http-client-gate)
|
expected-moves=(list move:http-client-gate)
|
||||||
==
|
==
|
||||||
^- [tang _http-client-gate]
|
^- [tang _http-client-gate]
|
@ -30,7 +30,7 @@
|
|||||||
[hen %slip %c %init ~nul]
|
[hen %slip %c %init ~nul]
|
||||||
[hen %slip %g %init ~nul]
|
[hen %slip %g %init ~nul]
|
||||||
[hen %slip %d %init ~nul]
|
[hen %slip %d %init ~nul]
|
||||||
[hen %slip %r %init ~nul]
|
[hen %slip %e %init ~nul]
|
||||||
[hen %give %init ~nul]
|
[hen %give %init ~nul]
|
||||||
[hen %pass /~nul/init %b %wait +(~1234.5.6)]
|
[hen %pass /~nul/init %b %wait +(~1234.5.6)]
|
||||||
== ==
|
== ==
|
||||||
@ -70,7 +70,7 @@
|
|||||||
^= comparator
|
^= comparator
|
||||||
|= moves=(list move:jael-gate)
|
|= moves=(list move:jael-gate)
|
||||||
?> ?=(^ moves)
|
?> ?=(^ moves)
|
||||||
?> ?=([* %pass * %l %request *] i.moves)
|
?> ?=([* %pass * %i %request *] i.moves)
|
||||||
;: weld
|
;: weld
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!> 1
|
!> 1
|
||||||
|
@ -1431,103 +1431,15 @@ _http_release_ports_file(c3_c *pax_c)
|
|||||||
free(paf_c);
|
free(paf_c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* _http_czar_host(): galaxy hostname as (unit host:eyre)
|
|
||||||
*/
|
|
||||||
static u3_noun
|
|
||||||
_http_czar_host(void)
|
|
||||||
{
|
|
||||||
u3_noun dom = u3_nul;
|
|
||||||
return dom;
|
|
||||||
|
|
||||||
// XX revisit
|
|
||||||
#if 0
|
|
||||||
if ( (0 == u3_Host.ops_u.imp_c) || (c3n == u3_Host.ops_u.net) ) {
|
|
||||||
return dom;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
c3_c* dns_c = u3_Host.ops_u.dns_c;
|
|
||||||
c3_w len_w = strlen(dns_c);
|
|
||||||
c3_w dif_w;
|
|
||||||
c3_c* dom_c;
|
|
||||||
c3_c* dot_c;
|
|
||||||
|
|
||||||
while ( 0 != len_w ) {
|
|
||||||
if ( 0 == (dot_c = strchr(dns_c, '.'))) {
|
|
||||||
len_w = 0;
|
|
||||||
dom = u3nc(u3i_string(dns_c), dom);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dif_w = dot_c - dns_c;
|
|
||||||
dom_c = c3_malloc(1 + dif_w);
|
|
||||||
strncpy(dom_c, dns_c, dif_w);
|
|
||||||
dom_c[dif_w] = 0;
|
|
||||||
|
|
||||||
dom = u3nc(u3i_string(dom_c), dom);
|
|
||||||
|
|
||||||
// increment to skip leading '.'
|
|
||||||
dns_c = dot_c + 1;
|
|
||||||
free(dom_c);
|
|
||||||
|
|
||||||
// XX confirm that underflow is impossible here
|
|
||||||
len_w -= c3_min(dif_w, len_w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( u3_nul == dom ) {
|
|
||||||
return dom;
|
|
||||||
}
|
|
||||||
|
|
||||||
// increment to skip '~'
|
|
||||||
dom = u3nc(u3i_string(u3_Host.ops_u.imp_c + 1), u3kb_flop(u3k(dom)));
|
|
||||||
|
|
||||||
return u3nt(u3_nul, c3y, u3kb_flop(u3k(dom)));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* u3_http_ef_bake(): notify %eyre that we're live
|
/* u3_http_ef_bake(): notify %eyre that we're live
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
u3_http_ef_bake(void)
|
u3_http_ef_bake(void)
|
||||||
{
|
{
|
||||||
u3_noun ipf = u3_nul;
|
u3_noun pax = u3nq(u3_blip, u3i_string("http-server"),
|
||||||
|
u3k(u3A->sen), u3_nul);
|
||||||
|
|
||||||
{
|
u3_pier_plan(pax, u3nc(c3__born, u3_nul));
|
||||||
struct ifaddrs* iad_u;
|
|
||||||
getifaddrs(&iad_u);
|
|
||||||
|
|
||||||
struct ifaddrs* dia_u = iad_u;
|
|
||||||
|
|
||||||
while ( iad_u ) {
|
|
||||||
struct sockaddr_in* adr_u = (struct sockaddr_in *)iad_u->ifa_addr;
|
|
||||||
|
|
||||||
if ( (0 != adr_u) && (AF_INET == adr_u->sin_family) ) {
|
|
||||||
c3_w ipf_w = ntohl(adr_u->sin_addr.s_addr);
|
|
||||||
|
|
||||||
if ( INADDR_LOOPBACK != ipf_w ) {
|
|
||||||
ipf = u3nc(u3nc(c3n, u3i_words(1, &ipf_w)), ipf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
iad_u = iad_u->ifa_next;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeifaddrs(dia_u);
|
|
||||||
}
|
|
||||||
|
|
||||||
u3_noun hot = _http_czar_host();
|
|
||||||
|
|
||||||
if ( u3_nul != hot ) {
|
|
||||||
ipf = u3nc(u3k(u3t(hot)), ipf);
|
|
||||||
u3z(hot);
|
|
||||||
}
|
|
||||||
|
|
||||||
u3_noun pax = u3nq(u3_blip, u3i_string("http-server"), u3k(u3A->sen), u3_nul);
|
|
||||||
|
|
||||||
u3_pier_plan(pax, u3nc(c3__born, ipf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u3_hreq*
|
static u3_hreq*
|
||||||
|
Loading…
Reference in New Issue
Block a user