From a0737a02e6977e8ca9095f72127249e6faf3cd00 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Sun, 23 Mar 2014 12:42:18 -0700 Subject: [PATCH] More http fixes. --- arvo/ames.hoon | 1 + arvo/eyre.hoon | 56 +++++++++++++++++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/arvo/ames.hoon b/arvo/ames.hoon index 6de4598d0b..91b2ade151 100644 --- a/arvo/ames.hoon +++ b/arvo/ames.hoon @@ -1491,6 +1491,7 @@ :* [[~ %gold p.bon] [/c hen] [%init p.bon]] [[~ %gold p.bon] hen [%init p.bon]] [[~ %gold p.bon] [/a hen] [%kick now]] + [[~ %gold p.bon] [/e hen] [%init p.bon]] ~ :: =+ bos=(sein p.bon) :: =. bos ?.(=(bos p.bon) bos ~zod) diff --git a/arvo/eyre.hoon b/arvo/eyre.hoon index 6b4fa5520f..6a49ec1f3a 100644 --- a/arvo/eyre.hoon +++ b/arvo/eyre.hoon @@ -7,6 +7,7 @@ |% :: structures ++ bolo :: eyre state $: gub=@t :: random identity + hov=(unit ,@p) :: master for remote ged=duct :: client interface ney=@uvI :: rolling entropy dop=(map host ship) :: host aliasing @@ -38,6 +39,7 @@ == :: ++ rote :: remote server $: cnt=@ud :: number served + sor=@p :: home sponsor rem=[p=@ud q=(map ,@ud duct)] :: active requests == :: ++ serf :: local server @@ -122,6 +124,19 @@ ~|([%ye-bad -.fav] !!) :: %born +(ged hen) :: register external + %init :: register ownership + %_ +.$ + hov ?~(hov [~ p.fav] [~ (min u.hov p.fav)]) + own + %+ ~(put by own) + p.fav + ^- serf + :* (cat 3 gub (rsh 3 1 (scot %p p.fav))) + ~ + ~ + == + == + :: %that :: outbound response ?> ?=([@ @ @ ~] tea) :: =+ :* our=(slaw %p i.tea) :: ship @@ -252,28 +267,31 @@ ++ hork :: remote request |= [him=ship hyx=httx] ^+ +> + =+ ^= sur ^- (unit ship) + ?^ hov hov + ?^ own [~ p.n.own] + ~ + ?~ sur (fail 500 "no vessel available to proxy {}") =+ ^= rot ^- rote =+ rut=(~(get by fon) him) - ?^(rut u.rut *rote) + ?^ rut u.rut + [0 u.sur [0 ~]] =+ num=p.rem.rot - =. +>.$ - %_ +>.$ - mow - :_ mow - :+ wru - [/a [%c %hork (scot %ud num) ~] hen] - [%want him [%pr ~] hyx] - :: - fon - %+ ~(put by fon) him - %_ rot - cnt +(cnt.rot) - p.rem +(p.rem.rot) - q.rem (~(put by q.rem.rot) num hen) - == + %_ +>.$ + mow + :_ mow + :+ [~ %gold sor.rot] + [/a [%c %hork (scot %ud num) ~] hen] + [%want him [%pr ~] hyx] + :: + fon + %+ ~(put by fon) him + %_ rot + cnt +(cnt.rot) + p.rem +(p.rem.rot) + q.rem (~(put by q.rem.rot) num hen) == - ~& [%hork him] - !! + == :: ++ horn :: irregular request |= [pul=purl cip=clip moh=moth] @@ -369,7 +387,7 @@ =+ suf=(~(get by own) our) ?^ suf u.suf =+ sef=*serf - sef(pef (cat 3 gub (rsh 3 1 (scot %p our)))) + sef(pef (cat 3 gub (rsh 3 1 (scot %p our)))) :: XX transitional =+ ^= saw ^- [p=hole q=cyst] =+ lig=(coss pef.sef q.moh) ?^ lig