-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove HTTP::RequestProcessor #7248
Comments
I don't mind the split, purely on a code separation point of view. I don't think it needs to be a documented type though. |
@RX14 I agree on the separation point. But it's really just a single method with almost no state. That single ivar could even be refactored out by passing in a I do like however that the |
@straight-shoota yes, it's a single method, but it's a long one and I wouldn't want to make |
Oh, yes. I'd actually too prefer to leave the code in |
I dislike splitting a single class between multiple files even more. It always makes it confusing where things come from. If it's obviously a different type you're calling a method on ( I'd be very happy if |
The
HTTP::RequestProcessor
class simply delegates the request handling forHTTP::Server
. I don't think this needs to be a distinct type. There is a 1:1 coupling between each server and processor, and it basically consists of one method and two ivars which can easily be integrated intoHTTP::Server
directly.I suppose the class was originally introduced in ecdcea9 as an easy to use interface for testing request processing, since
HTTP::Server
required to set up a TCP server for that andRequestProcessor
operates on IOs which can be easily be tested usingIO::Memory
.After #5776 this is no longer the case. Setting up a
HTTP::Server
instance doesn't anymore instantly open a TCP server. It could easily be used for testing handler chains without going through any network socket.HTTP::RequestProcessor
is part of the public API, but has no documentation. I doubt it has any practical use case where it couldn't be substituted byHTTP::Server
directly.The text was updated successfully, but these errors were encountered: