web/src/main/java/org/springframework/security/web/header/writers/HstsHeaderWriter.java
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
		if (this.requestMatcher.matches(request)) {
			if (!response.containsHeader(HSTS_HEADER_NAME)) {
				response.setHeader(HSTS_HEADER_NAME, this.hstsHeaderValue);
			}
		}
		else if (this.logger.isDebugEnabled()) {
			this.logger
					.debug("Not injecting HSTS header since it did not match the requestMatcher "
							+ this.requestMatcher);
		}
	}
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
		if (this.requestMatcher.matches(request)) {
			if (!response.containsHeader(HSTS_HEADER_NAME)) {
				response.setHeader(HSTS_HEADER_NAME, this.hstsHeaderValue);
			}
		}
		else if (this.logger.isDebugEnabled()) {
			this.logger
					.debug("Not injecting HSTS header since it did not match the requestMatcher "
							+ this.requestMatcher);
		}
	}
public void writeHeaders ( HttpServletRequest request , HttpServletResponse response ) { if ( this . requestMatcher . matches ( request ) ) { if ( ! response . containsHeader ( HSTS_HEADER_NAME ) ) { response . setHeader ( HSTS_HEADER_NAME , this . hstsHeaderValue ) ; } } else if ( this . logger . isDebugEnabled ( ) ) { this . logger . debug ( "Not injecting HSTS header since it did not match the requestMatcher " + this . requestMatcher ) ; } }
/*
(non-Javadoc)

@see org.springframework.security.web.headers.HeaderWriter#writeHeaders(javax
.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
/ * ( non - Javadoc )