This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new efb081e0fc [WICKET-7033] add comments to code
efb081e0fc is described below

commit efb081e0fcce176565f50b878b4941ac6de19af5
Author: reiern70 <[email protected]>
AuthorDate: Thu Apr 20 08:20:44 2023 +0300

    [WICKET-7033] add comments to code
---
 .../markup/html/form/upload/resource/AbstractFileUploadResource.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
index 4496b49938..f931f95f4f 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
@@ -143,6 +143,9 @@ public abstract class AbstractFileUploadResource extends 
AbstractResource
                catch (FileUploadException fux)
                {
                        resourceResponse.setContentType("application/json");
+                       // even when this exceptional situation we want the 
request to be successful
+                       // as we are just sending back to client some JSON with 
error messages
+                       // which will in turn be sent to wicket component (who 
will handle the errors)
                        
resourceResponse.setStatusCode(HttpServletResponse.SC_OK);
                        JSONObject json = new JSONObject();
                        json.put("error", true);

Reply via email to