Bug
Upload of large file fails
Issue description
When a user uploads a large file (23,8 MB) and has PWA online enabled, the upload fails and Topincs shows the modal error message "Upload response could not be parsed.". Inspecting the http communication shows that the upload is performed outside the sessions as anonymous. Everything works as expeceted for smaller files (1-2 MB).
Developer comments
Occurs also when PWA is turned off and not only in Chrome, but also in Firefox.
When the PDF files grow in size, the PHP request processing starts from the very beginning with the header Content-Type already sent. At this point there is no Topincs specific PHP files loaded, but the header is not sent by Apache. Very strange.
Affects other file types too, not only PDF.
This was caused by a very early PHP warning since PHP was unable to parse the body and ran into more than %max_input_vars%. Why this happens now is unclear since the body in the upload is sent as %application/octet-stream% which should avoid the parsing all together. But the parsing is anyway just happening because %enable_post_data_reading% is enabled. The dependency on the code on this flag being enabled was removed easily, since there was only a single location which used %$_POST%.
|
Work sessions2
Start |
2022-11-16T08:12:12
|
End |
2022-11-16T10:19:04
|
Participant |
Robert Cerny
|
Start |
2022-11-18T07:34:54
|
End |
2022-11-18T11:44:41
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.