mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
Delivers %inbound-requests internally now, but kick: lost the http-response.
This commit is contained in:
parent
a15220a2e4
commit
788b9554a5
@ -1619,6 +1619,7 @@
|
||||
[hen [%slip %e %init p.bon]]
|
||||
[hen [%slip %g %init p.bon]]
|
||||
[hen [%slip %d %init p.bon]] :: must be after gall
|
||||
[hen [%slip %l %init p.bon]]
|
||||
~
|
||||
==
|
||||
::
|
||||
|
@ -199,6 +199,7 @@
|
||||
++ request
|
||||
|= [secure=? =address =http-request]
|
||||
^- [(list move) server-state]
|
||||
~& [%request secure address http-request]
|
||||
::
|
||||
=+ host=(get-header 'Host' header-list.http-request)
|
||||
=+ action=(get-action-for-binding host url.http-request)
|
||||
@ -592,7 +593,6 @@
|
||||
=/ task=task:able
|
||||
?. ?=(%soft -.wrapped-task)
|
||||
wrapped-task
|
||||
~| [%call p.wrapped-task]
|
||||
((hard task:able) p.wrapped-task)
|
||||
::
|
||||
?- -.task
|
||||
@ -627,6 +627,10 @@
|
||||
:: %inbound-request: handles an inbound http request
|
||||
::
|
||||
%inbound-request
|
||||
::
|
||||
:: TODO: This is uncommit
|
||||
::
|
||||
~| [%ship ship.ax]
|
||||
=/ event-args [[(need ship.ax) eny duct now scry-gate] server-state.ax]
|
||||
=/ request request:(per-server-event event-args)
|
||||
=^ moves server-state.ax
|
||||
@ -636,6 +640,7 @@
|
||||
:: %connect / %serve
|
||||
::
|
||||
?(%connect %serve)
|
||||
~| [%task task]
|
||||
=/ event-args [[(need ship.ax) eny duct now scry-gate] server-state.ax]
|
||||
=/ add-binding add-binding:(per-server-event event-args)
|
||||
=^ moves server-state.ax
|
||||
|
@ -2291,14 +2291,14 @@
|
||||
:: +http-method: exhaustive list of http verbs
|
||||
::
|
||||
+$ http-method
|
||||
$? _'CONNECT'
|
||||
_'DELETE'
|
||||
_'GET'
|
||||
_'HEAD'
|
||||
_'OPTIONS'
|
||||
_'POST'
|
||||
_'PUT'
|
||||
_'TRACE'
|
||||
$? %'CONNECT'
|
||||
%'DELETE'
|
||||
%'GET'
|
||||
%'HEAD'
|
||||
%'OPTIONS'
|
||||
%'POST'
|
||||
%'PUT'
|
||||
%'TRACE'
|
||||
==
|
||||
:: +http-request: a single http-request
|
||||
::
|
||||
|
@ -176,7 +176,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
['GET' '/' ~ ~]
|
||||
[%'GET' '/' ~ ~]
|
||||
==
|
||||
^= expectec-moves
|
||||
^- (list move:light-gate)
|
||||
@ -228,7 +228,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
['GET' '/' ~ ~]
|
||||
[%'GET' '/' ~ ~]
|
||||
==
|
||||
^= comparator
|
||||
|= moves=(list move:light-gate)
|
||||
@ -249,7 +249,7 @@
|
||||
:+ /run-app/app1 [~nul ~nul]
|
||||
^- cush:gall
|
||||
:* %app1 %poke %handle-http-request
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] ['GET' '/' ~ ~]])
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||
==
|
||||
card
|
||||
==
|
||||
@ -311,7 +311,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
['GET' '/' ~ ~]
|
||||
[%'GET' '/' ~ ~]
|
||||
==
|
||||
^= comparator
|
||||
|= moves=(list move:light-gate)
|
||||
@ -332,7 +332,7 @@
|
||||
:+ /run-app/app1 [~nul ~nul]
|
||||
^- cush:gall
|
||||
:* %app1 %poke %handle-http-request
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] ['GET' '/' ~ ~]])
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/' ~ ~]])
|
||||
==
|
||||
card
|
||||
==
|
||||
@ -415,7 +415,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
['GET' '/~landscape/inner-path' ~ ~]
|
||||
[%'GET' '/~landscape/inner-path' ~ ~]
|
||||
==
|
||||
^= comparator
|
||||
|= moves=(list move:light-gate)
|
||||
@ -436,7 +436,7 @@
|
||||
:+ /run-app/app1 [~nul ~nul]
|
||||
^- cush:gall
|
||||
:* %app1 %poke %handle-http-request
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] ['GET' '/~landscape/inner-path' ~ ~]])
|
||||
!>([%.n %.n [%ipv4 .192.168.1.1] [%'GET' '/~landscape/inner-path' ~ ~]])
|
||||
==
|
||||
card
|
||||
==
|
||||
@ -470,7 +470,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
['GET' '/~/login?redirect=/~landscape/inner-path' ~ ~]
|
||||
[%'GET' '/~/login?redirect=/~landscape/inner-path' ~ ~]
|
||||
==
|
||||
^= expected-moves
|
||||
^- (list move:light-gate)
|
||||
@ -496,7 +496,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
'POST'
|
||||
%'POST'
|
||||
'/~/login'
|
||||
~
|
||||
:- ~
|
||||
@ -531,7 +531,7 @@
|
||||
%inbound-request
|
||||
%.n
|
||||
[%ipv4 .192.168.1.1]
|
||||
'GET'
|
||||
%'GET'
|
||||
'/~landscape/inner-path'
|
||||
['Cookie' 'urbauth=0v3.q0p7t.mlkkq.cqtto.p0nvi.2ieea']~
|
||||
~
|
||||
|
Loading…
Reference in New Issue
Block a user