1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.danube.http;
14
15 import org.abstracthorizon.danube.connection.Connection;
16 import org.abstracthorizon.danube.mvc.MVCConnectionHandler;
17
18 import java.io.IOException;
19
20
21
22
23
24
25
26 public class HTTPMVCConnectionHandler extends MVCConnectionHandler {
27
28
29 public HTTPMVCConnectionHandler() {
30 }
31
32
33
34
35
36
37 public void handleConnection(Connection connection) {
38 HTTPConnection httpConnection = (HTTPConnection)connection.adapt(HTTPConnection.class);
39 httpConnection.getResponseHeaders().putOnly("Pragma", "No-cache");
40 httpConnection.getResponseHeaders().putOnly("Cache-Control", "no-cache");
41 httpConnection.getResponseHeaders().putOnly("Cache-Control", "no-store");
42 super.handleConnection(httpConnection);
43 }
44
45 }