copy pasta setHeadersRealType