Skip to content

Commit eabad33

Browse files
committed
Hessian service exporter sets content type "application/x-hessian" (SPR-5621)
1 parent aa8bd63 commit eabad33

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

org.springframework.web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
*/
5555
public class HessianExporter extends RemoteExporter implements InitializingBean {
5656

57+
public static final String CONTENT_TYPE_HESSIAN = "application/x-hessian";
58+
59+
5760
private SerializerFactory serializerFactory = new SerializerFactory();
5861

5962
private Log debugLogger;

org.springframework.web/src/main/java/org/springframework/remoting/caucho/HessianServiceExporter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public void handleRequest(HttpServletRequest request, HttpServletResponse respon
6161
new String[] {"POST"}, "HessianServiceExporter only supports POST requests");
6262
}
6363

64+
response.setContentType(CONTENT_TYPE_HESSIAN);
6465
try {
6566
invoke(request.getInputStream(), response.getOutputStream());
6667
}

org.springframework.web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public void handle(HttpExchange exchange) throws IOException {
6666
throw new IOException("Hessian skeleton invocation failed", ex);
6767
}
6868

69+
exchange.getResponseHeaders().set("Content-Type", CONTENT_TYPE_HESSIAN);
6970
exchange.sendResponseHeaders(200, output.size());
7071
FileCopyUtils.copy(output.toByteArray(), exchange.getResponseBody());
7172
}

0 commit comments

Comments
 (0)