puniverse / comsat

Fibers and actors for web development
docs.paralleluniverse.co/comsat
Other
598 stars 103 forks source link

Undertow Web Actors: support fallback HttpHandler #61

Closed roded closed 8 years ago

circlespainter commented 8 years ago

A 40x status could be produced by an actor as well, could you handle this case too? Also, I prefer to set non-private methods final unless there's a reason not to.

roded commented 8 years ago

Sorry, I don't follow; is that not handled by HttpActorAdapter?

circlespainter commented 8 years ago

HttpActorAdapter.handleReply will send a response in case there's an error status; instead, with chaining and if the statux it is 40x, it should really invoke the next handler (if there is one).

roded commented 8 years ago

Though, are not client error statuses considered an attempt at handling and should be thus promptly return to the user?

circlespainter commented 8 years ago

True; I also think that the method (and field) name should probably be something like setFallbackHandler because setNextHandler could suggest that it is always called, like it can happen f.e. in a Netty pipeline.

circlespainter commented 8 years ago

Looks good, thanks!