You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering whether the intention of Giraffe's compose function is meant to include the validation of the httpContext between handler1 and handler2 (checking if the response has started transmitting, and short circuiting the chain if so)
Apologies if this reading is inaccurate, and that these checks are only intended between pipelines and not between handlers inside a single pipeline. If that is the case then what follows can be ignored.
Given a pipeline of
handler1 -> handler2 -> handler3 -> handler4 -> finalDocFunc
what I was expecting to see when I ran a simplified version of compose was:
handler1 -> checker -> handler2 -> checker -> handler3 -> checker -> handler4 -> finalDocFunc
or at least
handler1 -> handler2 -> checker -> handler3 -> checker -> handler4 -> finalDocFunc
But what I get is
checker -> checker -> checker -> handler1 -> handler2 -> handler3 -> handler4 -> finalDocFunc
with the result that only the initial state of the document is checked, and several times at that. Once handler1 kicks in, no checkers are passed through.
I have sample code and a more complete description of this here
If it is more convenient I can paste the contents of that ReadMe file here.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am wondering whether the intention of Giraffe's compose function is meant to include the validation of the httpContext between handler1 and handler2 (checking if the response has started transmitting, and short circuiting the chain if so)
Apologies if this reading is inaccurate, and that these checks are only intended between pipelines and not between handlers inside a single pipeline. If that is the case then what follows can be ignored.
Given a pipeline of
handler1 -> handler2 -> handler3 -> handler4 -> finalDocFunc
what I was expecting to see when I ran a simplified version of compose was:
handler1 -> checker -> handler2 -> checker -> handler3 -> checker -> handler4 -> finalDocFunc
or at least
handler1 -> handler2 -> checker -> handler3 -> checker -> handler4 -> finalDocFunc
But what I get is
checker -> checker -> checker -> handler1 -> handler2 -> handler3 -> handler4 -> finalDocFunc
with the result that only the initial state of the document is checked, and several times at that. Once handler1 kicks in, no checkers are passed through.
I have sample code and a more complete description of this here
If it is more convenient I can paste the contents of that ReadMe file here.
Beta Was this translation helpful? Give feedback.
All reactions