Return a copy of this request header with the principal cleared.

@return A copy of this request header.
358254
public RequestHeader clearPrincipal() {
        return new RequestHeader(method, uri, protocol, acceptedResponseProtocols, Optional.empty(), headers, lowercaseHeaders);
    }
662832
public Map<String, String> getResponseHeaders(){
        Collection<String> names  = RequestContext.getHttpResponse().getHeaderNames();
        Map<String, String> headers = new HashMap<>();
        for (String name : names) {
            headers.put(name, RequestContext.getHttpResponse().getHeader(name));
        }
        return headers;
    }
406355
public AuthToken copy() {
        final AuthToken authToken = new AuthToken(key);
        authToken.tokenName = tokenName;
        authToken.startTime = startTime;
        authToken.expiration = expiration;
        authToken.ip = ip;
        authToken.acl = acl;
        authToken.duration = duration;
        return authToken;
    }
1067989
@Nonnull
  @ReturnsMutableCopy
  public static HttpHeaderMap getResponseHeaderMap (@Nonnull final HttpServletResponse aHttpResponse)
  {
    ValueEnforcer.notNull (aHttpResponse, "HttpResponse");

    final HttpHeaderMap ret = new HttpHeaderMap ();
    for (final String sName : aHttpResponse.getHeaderNames ())
      for (final String sValue : aHttpResponse.getHeaders (sName))
        ret.addHeader (sName, sValue);
    return ret;
  }
1129154
public String clearSession() {

        synchronized (sharedLock) {
            SessionData session = loadSession();
            String id = session != null ? session.getSessionId() : null;
            clearAll();
            sharedLock.notifyAll();
            return id;
        }
    }
531821
def _copy(self):
    """"""
    copied_uri = Uri(self.uri.scheme, self.uri.host, self.uri.port,
                     self.uri.path, self.uri.query.copy())
    new_request = HttpRequest(uri=copied_uri, method=self.method,
                              headers=self.headers.copy())
    new_request._body_parts = self._body_parts[:]
    return new_request
188455
public String getCacheControlHeader() {
        checkIfMaxAgeIsResolved();
        String maxAge = Directive.MAX_AGE.getName() + "=" + (maxAgeResolvedValue > 0 ? maxAgeResolvedValue : "0");
        return staticDirectives.toString() + maxAge;
    }
869028
public HttpRequest withoutHeader(String header) {
		if(headers.containsKey(header)) {
			headers.remove(header);
		}
		return this;
	}
257007
public T removeHead() {
		if( first == null )
			throw new IllegalArgumentException("Empty list");

		T ret = first.getObject();
		Element<T> e = first;
		available.push(first);

		if( first.next != null ) {
			first.next.previous = null;
			first = first.next;
		} else {
			// there's only one element in the list
			first = last = null;
		}
		e.clear();
		size--;
		return ret;
	}
1291034
@Override
    public Principal getUserPrincipal() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getUserPrincipal();
        return null;
    }
1185156
public String toHeader() {
		StringBuilder header = new StringBuilder();
		header.append(name).append('=').append(value);
		if (domain != null) {
			header.append("; ").append("Domain=").append(domain);
		}
		if (path != null) {
			header.append("; ").append("Path=").append(path);
		}
		if (expireTime > -1) {
			header.append("; ").append("Expires=").append(RFC_DATEFORMAT.format(new Date(expireTime)));
		}
		if (secure) {
			header.append("; ").append("Secure");
		}
		return header.toString();
	}
601522
public String getHeader()
    {
        if (this.header == null)
        {
            if (this.headerKeys == null)
            {
                this.headerKeys = new String[2];
                this.headerKeys[0] = getPropertyName() + ".header";
                this.headerKeys[1] = getPropertyName();
            }
            this.header = ValkyrieRepository.getInstance().getApplicationConfig().messageResolver().getMessage(new DefaultMessageSourceResolvable(this.headerKeys, null,
                    this.headerKeys[this.headerKeys.length - 1]));
        }
        // JTableHeader has a reusable defaultHeaderRenderer on which the default height must be correct.
        // when painting, the columns headers are processed in order and height is being calculated, 
        // if label is null or empty string header height is 4 and thus leaves us with a very small
        // table-header, fix this by returning a space (-> font-size is incorporated)
        return "".equals(this.header) ? " " : this.header;
    }
551075
public static Map<String, String> headers(){
        Map<String, String> headers = new HashMap<>();
        Enumeration<String> names = RequestContext.getHttpRequest().getHeaderNames();
        while (names.hasMoreElements()) {
            String name = names.nextElement();
            headers.put(name, RequestContext.getHttpRequest().getHeader(name));
        }
        return headers;
    }
1073473
public com.google.protobuf.ByteString
      getHttpHeaderBytes() {
    java.lang.Object ref = httpHeader_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      httpHeader_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
916747
public String getHeaderValue(final String headerName) {
     if (headerName == null) { return null; }
     return request.headers().get(headerName);
   }
53000
public String[] getHeader() {
        
        return columns.stream()
            .map(c -> headerMapper.toMap(c, configuration, groups))
            .toArray(n -> new String[n]);
        
    }
321614
public java.security.Principal getUserPrincipal()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        IWebAppSecurityCollaborator webAppSec=null;
        if (getDispatchContext()!=null && getDispatchContext().getWebApp() != null) {
            webAppSec = CollaboratorHelperImpl.getCurrentSecurityCollaborator(getDispatchContext().getWebApp());
        } else {
            webAppSec = CollaboratorHelperImpl.getCurrentSecurityCollaborator();           
        } 
            
        if (webAppSec != null) {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"getUserPrincipal", "calling getUserPrincipal on " + webAppSec.getClass().getName());
            }
            return webAppSec.getUserPrincipal();
        } else {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)){  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"getUserPrincipal", "returning null");
            }
            // No IWebAppSecurityCollaborator means no security, so no Principal 
            return null;
        }
    }