Did some debugging that led me here:


On Thu, Jun 9, 2016 at 4:13 PM, Sean Dawson <seandawson2...@gmail.com>

> (3.0.16.Final)
> If I use RestEasy (client) to call a RestEasy server, and that server
> throws an exception with a 304 status code (no other processing at this
> point), RestEasy on the client seems to still attempt to buffer the entity
> (in normal operation, this particular server method is supposed to return
> an InputStream and is set to @Produces("application/octet-stream")).  Since
> there's no entity, an NPE is thrown.
> What's the right way to do this.... ?
> - clear the media type
> - set the InputStream to the entity anyway before throwing exception
> - set an empty InputStream (again before throwing exception)
> - use a ClientResponseFilter to - in the case of a 304 or other error
> status - either
>      - throw an exception
>      - set the response to an empty input stream (or an error message)
>      - use abortWith to create a different response
> - not return a 304, do something else instead
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
Resteasy-users mailing list

Reply via email to