[undertow-dev] Resource Handling Revisited

Stuart Douglas sdouglas at redhat.com
Mon Jan 2 17:46:38 EST 2017


I would be ok with that, however why can't you just use the
ResourceHandler? PathResourceManager will use transferFrom if the file
is larger than a configured minimum (the transferMinSize parameter in
the constructor).

Stuart

On Wed, Dec 28, 2016 at 1:52 AM, Hicks, Matt <matt at matthicks.com> wrote:
> Previously I've asked about streaming a single file back to the client and
> got some good insight as to how to accomplish this with `transferFrom`, but
> this misses out on all the extra features like resuming transfers, cached
> content, etc.  It would be very nice Undertow offered a static utility
> method to serve up File, Path, and URL providing all of this functionality
> that is currently contained in ResourceHandler
> (https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/server/handlers/resource/ResourceHandler.java#L155).
>
> I don't think it would be difficult to extract all of that out of the
> private method and simply have ResourceHandler call the static method.
> Stuart, what do you think?
>
> I'd even be willing to do the leg-work if you'd be willing to accept a PR
> for it.
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list