Responds to an HTTP request.
@param request The
Request
object that represents the HTTP request.
@return
true
if the request was handled. A request washandled if a response was supplied to the client, typically by calling
Request.sendResponse()
or
Request.sendError
.
@throws IOException if there was an I/O error while sending the response to the client. Typically, in that case, the
Server
will (try to) send an error message to the client and then close the client's connection.
The IOException
should not be used to silently ignore problems such as being unable to access some server-side resource (for example getting a FileNotFoundException
due to not being able to open a file). In that case, the Handler
's duty is to turn that IOException
into a HTTP response indicating, in this case, that a file could not be found.