Index: /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Client.java
===================================================================
--- /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Client.java	(revision 35920)
+++ /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Client.java	(revision 35921)
@@ -37,4 +37,5 @@
 
     private static final Map<Duration, HttpClient> clientForConnectTimeout = new ConcurrentHashMap<>();
+    private static final String USER_AGENT_STRING = "User-Agent";
     private HttpRequest request;
     private HttpResponse<InputStream> response;
@@ -57,4 +58,5 @@
     HttpRequest createRequest() throws IOException {
         HttpRequest.Builder requestBuilder;
+        Map<String, String> headers = getHeaders();
         try {
             requestBuilder = HttpRequest.newBuilder()
@@ -63,5 +65,5 @@
                               ? BodyPublishers.ofByteArray(getRequestBody())
                               : BodyPublishers.noBody())
-                      .header("User-Agent", Version.getInstance().getFullAgentString());
+                      .header(USER_AGENT_STRING, headers.getOrDefault(USER_AGENT_STRING, Version.getInstance().getFullAgentString()));
         } catch (URISyntaxException e) {
             throw new IOException(e);
@@ -78,6 +80,6 @@
             requestBuilder.header("Cache-Control", "no-cache");
         }
-        for (Map.Entry<String, String> header : getHeaders().entrySet()) {
-            if (header.getValue() != null) {
+        for (Map.Entry<String, String> header : headers.entrySet()) {
+            if (header.getValue() != null && !USER_AGENT_STRING.equals(header.getKey())) {
                 try {
                     requestBuilder.header(header.getKey(), header.getValue());
Index: /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Plugin.java
===================================================================
--- /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Plugin.java	(revision 35920)
+++ /applications/editors/josm/plugins/http2/src/org/openstreetmap/josm/plugins/http2/Http2Plugin.java	(revision 35921)
@@ -4,4 +4,6 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.tools.Destroyable;
+import org.openstreetmap.josm.tools.Http1Client;
 import org.openstreetmap.josm.tools.HttpClient;
 
@@ -9,5 +11,5 @@
  * Provides HTTP/2 support.
  */
-public class Http2Plugin extends Plugin {
+public class Http2Plugin extends Plugin implements Destroyable {
 
     /**
@@ -19,3 +21,8 @@
         HttpClient.setFactory(Http2Client::new);
     }
+
+    @Override
+    public void destroy() {
+        HttpClient.setFactory(Http1Client::new);
+    }
 }
