Revision 59aa2375
b/src/gr/grnet/pithos/web/client/Const.java | ||
---|---|---|
10 | 10 |
public static final String CONTENT_TYPE = "Content-Type"; |
11 | 11 |
public static final String ACCEPT = "Accept"; |
12 | 12 |
public static final String CONTENT_LENGTH = "Content-Length"; |
13 |
public static final String HTTP_HEADER_SERVER = "Server"; |
|
14 |
public static final String HTTP_HEADER_CONNECTION = "Connection"; |
|
15 |
public static final String HTTP_HEADER_KEEP_ALIVE = "Keep-Alive"; |
|
16 |
public static final String HTTP_HEADER_DATE = "Date"; |
|
13 | 17 |
|
14 | 18 |
public static final String X_AUTH_TOKEN = "X-Auth-Token"; |
15 | 19 |
public static final String X_OBJECT_SHARING = "X-Object-Sharing"; |
b/src/gr/grnet/pithos/web/client/Helpers.java | ||
---|---|---|
71 | 71 |
builder.setHeader(headerName, headerValue); |
72 | 72 |
|
73 | 73 |
if(Pithos.IsDetailedHTTPLOGEnabled) { |
74 |
Pithos.LOG(" ==> ", headerName, ": ", headerValue); |
|
74 |
if(!Pithos.HTTPHeadersToIgnoreInLOG.contains(headerName)) { |
|
75 |
Pithos.LOG(" ==> ", headerName, ": ", headerValue); |
|
76 |
} |
|
75 | 77 |
} |
76 | 78 |
} |
77 | 79 |
} |
... | ... | |
91 | 93 |
|
92 | 94 |
final Header[] headers = response.getHeaders(); |
93 | 95 |
for(Header header : headers) { |
94 |
final String name = header.getName(); |
|
95 |
final String value = header.getValue(); |
|
96 |
Pithos.LOG(" <== ", name, ": ", value); |
|
96 |
final String headerName = header.getName(); |
|
97 |
final String headerValue = header.getValue(); |
|
98 |
if(!Pithos.HTTPHeadersToIgnoreInLOG.contains(headerName)) { |
|
99 |
Pithos.LOG(" <== ", headerName, ": ", headerValue); |
|
100 |
} |
|
97 | 101 |
} |
98 | 102 |
} |
99 | 103 |
catch(Exception e) { |
b/src/gr/grnet/pithos/web/client/Pithos.java | ||
---|---|---|
80 | 80 |
public class Pithos implements EntryPoint, ResizeHandler { |
81 | 81 |
private static final boolean IsLOGEnabled = true; |
82 | 82 |
public static final boolean IsDetailedHTTPLOGEnabled = true; |
83 |
public static final Set<String> HTTPHeadersToIgnoreInLOG = new HashSet<String>(); |
|
84 |
static { |
|
85 |
HTTPHeadersToIgnoreInLOG.add(Const.HTTP_HEADER_CONNECTION); |
|
86 |
HTTPHeadersToIgnoreInLOG.add(Const.HTTP_HEADER_DATE); |
|
87 |
HTTPHeadersToIgnoreInLOG.add(Const.HTTP_HEADER_KEEP_ALIVE); |
|
88 |
HTTPHeadersToIgnoreInLOG.add(Const.HTTP_HEADER_SERVER); |
|
89 |
} |
|
83 | 90 |
|
84 | 91 |
public static final Configuration config = GWT.create(Configuration.class); |
85 | 92 |
|
Also available in: Unified diff