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
DefaultStreamedContent.contentLength is Integer #9485
Comments
see ExternalContext:
|
I have a 5GB file to push through it, and it gets cut off at 2GB. What can be done? |
See
|
ExternalContext says it must push it through ServletResponse and ServletResponse now has the correct method for longs. |
Seems like a fckp of the ExternalContext guys. |
Can you get to ServletResponse bypassing ExternalContext? |
I think you should create a faces specification issue first |
Yes: "Servlet: This must be performed by calling the javax.servlet.http.HttpServletResponse setContentLength method." |
And wait a few years? I think I need a hack around your code and ExternalContext as well for today (business reality). Do you have an idea how? |
Faces 4.0 is on the track, might be a good chance currently to get it in |
i would copy StreamedContentHandler in your project in the same package, so yours is used |
Somehow I guess I need to be able to override FileDownloadActionListener.regularDownload and plug my implementation if that's possible? |
Clever. What about the other place I saw StreamedContent.getContentLength used? |
I hope this will be enough: |
From BalusC: FYI: work around: |
Not very helpful if all I have to work with p:fileDownload and StreamedContent is Integer contentLength. That part of PF API needs enchancement too, in anticipation of JSF API enchancement. Basically the workaround is only for PF internal classes, not for someone using PF API. |
That seems like a good plan for me :) |
agreed care to submit a PR? |
Lol, now I'll become a laughingstock for not knowing how you submit a PR. As for code modification, I can do it. Plus there's a decision to make whether keep old methods in StreamedContent and add Long ones, or just change existing ones to Long. |
Quickly, I can provide only this (changed files in zip): Issues:
|
@morvael i will take a look. |
PR submitted using OmniFaces trick. |
Looks like BalusC just submitted this to Mojarra: eclipse-ee4j/mojarra#5187 |
@melloware will you take of this in MF? |
Yep it looks like he submitted that for Mojarra 4.1 but we don't have a 4.1 can I just put it in 4.0.RC3? |
oh then lets wait till we have a 4.1 branch |
I think Long would be better for bigger files.
The text was updated successfully, but these errors were encountered: