On Tue, Jun 15, 2010 at 12:47 PM, Louis Letourneau < louis.letourn...@mail.mcgill.ca> wrote:
> I'm trying to send a file >2G using ResourceStreamRequestTarget + > FileResourceStream, but the content-type is always set to a big negative > value typical of a long(>2G) to int conversion. > This is non-standard and the proxy we use refuses it (most browser just > ignore it, but the RFC states that the value must be >0). > > After looking deeper in the code I see that, in wicket, longs are used > for the content length across the board, but when this is transfered to > a HttpServletResponse there is an (int) cast. > > Shouldn't wicket use ints to remove the confusion, or if not (and I > think this is the best course), shouldn't a test be made > if > Integer.MAX_VALUE > httpServletResponse.addHeader("Content-Length", Long.toString(length)); > > instead > ? > > I tried the last approach overriding newWebResponse on WebApplication > with my custom WebResponse and it fixed my problem. > > Should I open a bug? > > Thanks > Louis > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > yes, please open a jira -- Jeremy Thomerson http://www.wickettraining.com