aliostad wrote:
OWIN spec says that OWIN middleware's are called in the order they are defined. If I use UseWebApi or UseHttpMessageHandler which in turn use HttpMessageHandlerAdapter, next middleware is not called unless middleware returns 404.The standard behaviour of owin middleware is not specifically defined anywhere. It is entirely up to each middle component to decide whether to call the next step in the pipeline or not.
First of all, this is not according to my understanding of OWIN middleware. So if this behaviour correct, please point me to where this behaviour is described.
The problem is, implementing a common "DelegatingHandler" that can be shared among applications and is implemented as an OWIN middleware is impossible by the route of UseWebApi or UseHttpMessageHandler. I am trying to plugin CacheCow as an OWIN middleware and hoped to be able to use UseHttpMessageHandler.Reasonable request. Nancy does this, for example.
Any ideas?
I believe, there must be a parameter that you could control how "calling next" behaviour is defined, not just by the way of 404.