Skip to content

Commit e980705

Browse files
@initial 7.0.0-preview.423.3 Fix double wrapped data when return data on request
1 parent 250965e commit e980705

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/main/java/com/talexframe/frame/core/modules/network/connection/RequestAnalyser.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import org.springframework.lang.NonNull;
2828

2929
import javax.servlet.http.HttpServletRequest;
30+
import javax.servlet.http.HttpServletResponse;
31+
import java.io.OutputStream;
3032
import java.lang.reflect.Method;
3133
import java.lang.reflect.Parameter;
3234
import java.nio.charset.StandardCharsets;
@@ -228,7 +230,20 @@ private void process() {
228230

229231
if ( object != null ) {
230232

231-
wr.returnDataByOK(object);
233+
HttpServletResponse response = wr.getResponse();
234+
OutputStream os = response.getOutputStream();
235+
236+
response.setStatus(200);
237+
238+
String str = JSONUtil.toJsonStr(object);
239+
240+
response.setContentType("application/json");
241+
242+
os.write(str.getBytes(StandardCharsets.UTF_8));
243+
244+
os.flush();
245+
246+
log.info("[应用层] OK Return: " + str);
232247

233248
methodReceiver.processRedisCache(json, params, object);
234249

0 commit comments

Comments
 (0)