Index: DefaultAccessLogFormatterImpl.java =================================================================== RCS file: /cvs/glassfish/appserv-core/src/java/com/sun/enterprise/web/accesslog/DefaultAccessLogFormatterImpl.java,v retrieving revision 1.7 diff -r1.7 DefaultAccessLogFormatterImpl.java 50d49 < import javax.servlet.ServletResponse; 53d51 < import javax.servlet.http.HttpServletResponse; 60a59 > import org.apache.coyote.tomcat5.CoyoteResponse; 107a107,112 > private static final String RESPONSE_HEADER_BY_NAME_PREFIX = "response.header."; > private static final int RESPONSE_HEADER_BY_NAME_PREFIX_LEN > = RESPONSE_HEADER_BY_NAME_PREFIX.length(); > private static final String RESPONSE_HEADERS_BY_NAME_PREFIX = "response.headers."; > private static final int RESPONSE_HEADERS_BY_NAME_PREFIX_LEN > = RESPONSE_HEADERS_BY_NAME_PREFIX.length(); 241a247,254 > } else if (pc.startsWith(RESPONSE_HEADER_BY_NAME_PREFIX)) { > appendResponseHeaderByName(charBuffer, > pc.substring(RESPONSE_HEADER_BY_NAME_PREFIX_LEN), > response); > } else if (pc.startsWith(RESPONSE_HEADERS_BY_NAME_PREFIX)) { > appendResponseHeadersByName(charBuffer, > pc.substring(RESPONSE_HEADERS_BY_NAME_PREFIX_LEN), > response); 309c322,324 < && !component.startsWith(HEADERS_BY_NAME_PREFIX)) { --- > && !component.startsWith(HEADERS_BY_NAME_PREFIX) > && !component.startsWith(RESPONSE_HEADER_BY_NAME_PREFIX) > && !component.startsWith(RESPONSE_HEADERS_BY_NAME_PREFIX)) { 581a597,616 > /* > * Appends the value of the header with the specified name in the given > * response to the given char buffer, or NULL-RESPONSE-HEADER- if no > * header with the given name is present in the response. > */ > private void appendResponseHeaderByName(CharBuffer cb, > String headerName, > Response response) { > if (headerName == null) { > throw new IllegalArgumentException("Null response header name"); > } > > cb.put(QUOTE); > String value = ((CoyoteResponse)response).getHeader(headerName); > if (value == null) { > value = "NULL-RESPONSE-HEADER-" + headerName.toUpperCase(); > } > cb.put(value); > cb.put(QUOTE); > } 616a652,680 > /* > * Appends the values (separated by ";") of all headers with the > * specified name in the given response to the given char buffer, or > * NULL-RESPONSE-HEADERS- if no headers with the given name are > * present in the response. > */ > private void appendResponseHeadersByName(CharBuffer cb, > String headerName, > Response response) { > if (headerName == null) { > throw new IllegalArgumentException("Null response header name"); > } > > cb.put(QUOTE); > String[] headerValues = ((CoyoteResponse)response).getHeaderValues(headerName); > boolean first = true; > for (int i=0;i if (first) { > first = false; > } else { > cb.put(";"); > } > cb.put(headerValues[i]); > } > if (first) { > cb.put("NULL-RESPONSE-HEADERS-" + headerName.toUpperCase()); > } > cb.put(QUOTE); > }