Skip to content

Commit e5324f2

Browse files
authored
Clean ModelContext after an HTTP Upload. (#291)
1 parent 26832d2 commit e5324f2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

java/src/main/java/com/genexus/webpanels/GXObjectUploadServices.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,30 @@ protected void doExecute(HttpContext context) throws Exception
106106
jObj.put("object_id", CommonUtil.UPLOADPREFIX + keyId);
107107
context.writeText(jObj.toString());
108108
context.getResponse().flushBuffer();
109-
return;
110109
}
111110
}
112111
catch (Throwable e)
113112
{
114113
context.sendResponseStatus(404, e.getMessage());
115114
}
115+
finally {
116+
ModelContext.deleteThreadContext();
117+
}
116118
}
117119

118120
protected boolean IntegratedSecurityEnabled( )
119121
{
120-
return com.genexus.Application.getClientPreferences().getProperty("EnableIntegratedSecurity", "0").equals("1");
122+
return com.genexus.Application.getClientPreferences().getProperty("EnableIntegratedSecurity", "0").equals("1");
121123
}
122124

123125
protected int IntegratedSecurityLevel( )
124126
{
125-
return SECURITY_GXOBJECT;
127+
return SECURITY_GXOBJECT;
126128
}
127129

128130
protected String IntegratedSecurityPermissionPrefix( )
129131
{
130-
return "";
132+
return "";
131133
}
132134

133135
private String getExtension(String contentType)

0 commit comments

Comments
 (0)