mirror of
				https://github.com/scm-manager/scm-manager.git
				synced 2025-10-31 18:46:07 +01:00 
			
		
		
		
	Merge tag '2.46.6' into hotfix/3.7.x
Release version 2.46.6
This commit is contained in:
		| @@ -59,7 +59,12 @@ public class GitUserAgentProvider implements UserAgentProvider { | ||||
|           .basicAuthenticationCharset(Charsets.UTF_8) | ||||
|           .build(); | ||||
|  | ||||
|   private static final String PREFIX_GOGIT = "go-git/"; | ||||
|  | ||||
|   @VisibleForTesting | ||||
|   static final UserAgent GOGIT = UserAgent.scmClient("go-git") | ||||
|     .basicAuthenticationCharset(Charsets.UTF_8) | ||||
|     .build(); | ||||
|  | ||||
|  | ||||
|   @Override | ||||
| @@ -74,6 +79,8 @@ public class GitUserAgentProvider implements UserAgentProvider { | ||||
|       return GIT_LFS; | ||||
|     } else if (isGit(lowerUserAgent)) { | ||||
|       return GIT; | ||||
|     } else if (isGoGit(lowerUserAgent)) { | ||||
|       return GOGIT; | ||||
|     } else { | ||||
|       return null; | ||||
|     } | ||||
| @@ -98,4 +105,6 @@ public class GitUserAgentProvider implements UserAgentProvider { | ||||
|   private boolean isGit(String userAgent) { | ||||
|     return userAgent.startsWith(PREFIX_REGULAR); | ||||
|   } | ||||
|  | ||||
|   private boolean isGoGit(String userAgent) { return userAgent.startsWith(PREFIX_GOGIT); } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user