oryx fiddling

This commit is contained in:
Anton Dyudin 2015-03-13 16:45:03 -07:00
parent bf84060fde
commit 3100abc59c

View File

@ -128,13 +128,14 @@
$% [%for p=whir q=beam r=term s=cred] :: %f block $% [%for p=whir q=beam r=term s=cred] :: %f block
[%fot p=whir q=mark r=cage] :: %f translate [%fot p=whir q=mark r=cage] :: %f translate
[%fow p=@uvH] :: %f deps [%fow p=@uvH] :: %f deps
[%fin $|(~ pest-fin)] :: done [%fin pest-fin] :: done
[%mez p=hapt q=ship r=cage] :: %g message [%mez p=hapt q=ship r=cage] :: %g message
[%red %html] :: redirect [%red %html] :: redirect
[%zap p=@ud q=(list tank)] :: err [%zap p=@ud q=(list tank)] :: err
== ==
:: ::
++ pest-fin :: response ++ pest-fin :: response
$| ~
$% [%code p=@ud q=pest-fin] $% [%code p=@ud q=pest-fin]
[%json p=json] [%json p=json]
[%html p=manx] [%html p=manx]
@ -624,7 +625,6 @@
=. our ?~(oar our u.oar) :: XX =. our ?~(oar our u.oar) :: XX
=+ pez=process =+ pez=process
?: ?=(%| -.pez) p.pez :: XX transitional ?: ?=(%| -.pez) p.pez :: XX transitional
=+ status=200
|- ^+ done |- ^+ done
?- -.p.pez ?- -.p.pez
%for (beam-into-ford +.p.pez) %for (beam-into-ford +.p.pez)
@ -632,6 +632,7 @@
%fow (pass-note ~ %f [%wasp our p.p.pez]) %fow (pass-note ~ %f [%wasp our p.p.pez])
%mez (pass-note ~ %g [%mess +.p.pez]) %mez (pass-note ~ %g [%mess +.p.pez])
%zap (fail p.p.pez 0v0 q.p.pez) %zap (fail p.p.pez 0v0 q.p.pez)
%fin (finish +.p.pez)
%red %red
=+ url=(earn hat pok(p [~ %html]) quy) =+ url=(earn hat pok(p [~ %html]) quy)
?+ p.pok (fail 404 0v0 leaf/"bad redirect" leaf/<p.pok> leaf/url ~) ?+ p.pok (fail 404 0v0 leaf/"bad redirect" leaf/<p.pok> leaf/url ~)
@ -640,16 +641,18 @@
[~ %json] [~ %json]
$(p.pez [%fin %json (jobe ok/b/| red/(jape url) ~)]) $(p.pez [%fin %json (jobe ok/b/| red/(jape url) ~)])
== ==
:: ==
%fin ::
?~ +.p.pez done ++ finish
?- &2.p.pez =+ status=200
~ (give-gift %thou p.p.pez) |= pef=pest-fin ^+ done
%js (resp status text//javascript p.p.pez) ?~ pef done
%html (give-html status ~ p.p.pez) ?- -.pef
%json (give-json status ~ p.p.pez) ~ (give-gift %thou p.pef)
%code $(+.p.pez q.p.pez, status p.p.pez) %js (resp status text//javascript p.pef)
== %html (give-html status ~ p.pef)
%json (give-json status ~ p.pef)
%code $(pef q.pef, status p.pef)
== ==
:: ::
++ process ++ process
@ -662,7 +665,8 @@
~| [mef maf bod] ~| [mef maf bod]
=+ bem=as-beam =+ bem=as-beam
?^ bem (process-parsed %beam u.bem) ?^ bem (process-parsed %beam u.bem)
?> check-oryx ?. check-oryx
~|(%bad-oryx ~|([(parse-to-oryx q:(need bod)) vew.cyz:for-client] !!))
=+ hem=as-aux-request =+ hem=as-aux-request
?^ hem (process-parsed u.hem) ?^ hem (process-parsed u.hem)
~|(strange-path/q.pok !!) ~|(strange-path/q.pok !!)
@ -672,7 +676,7 @@
?. &(?=([~ %json] p.pok) ?=(%post mef) ?=(^ bod)) & ?. &(?=([~ %json] p.pok) ?=(%post mef) ?=(^ bod)) &
=+ oxe=(parse-to-oryx q.u.bod) =+ oxe=(parse-to-oryx q.u.bod)
?~ oxe | ?~ oxe |
& ::(~(has in vew.cyz:for-client) u.oxe) ::XX (~(has in vew.cyz:for-client) u.oxe)
:: ::
++ parse-to-oryx ;~(biff poja (ot oryx/so ~):jo) ++ parse-to-oryx ;~(biff poja (ot oryx/so ~):jo)
++ root-beak `beak`[our %main ud/0] :: XX ++ root-beak `beak`[our %main ud/0] :: XX
@ -723,8 +727,8 @@
%fin %fin
~| %not-script ~| %not-script
?> ?=(%js &2.p.pez) ?> ?=(%js &2.p.pez)
=^ jon ..ya stat-json:for-client :: XX state lost =^ jon ..ya stat-json:for-client
pez(p.p (jass jon p.p.pez)) [%| (finish +.p.pez(p (jass jon p.p.pez)))] :: XX better storage?
== ==
:: ::
%try %try
@ -855,7 +859,7 @@
=+ url=(welp (earn pul(p hat)) '#' (head:earn p.pul)) =+ url=(welp (earn pul(p hat)) '#' (head:earn p.pul))
%- give-gift %- give-gift
%+ add-cookies cug %+ add-cookies cug
:+ %thou 307 :+ %thou 307
[[location/(crip url)]~ ~] [[location/(crip url)]~ ~]
:: ::
++ stat-json ++ stat-json