Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java	(revision 5887)
@@ -3,11 +3,16 @@
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.URL;
+import java.net.URLConnection;
 
 import javax.swing.JEditorPane;
 
+import org.openstreetmap.josm.tools.Utils;
+
 /**
- * Subclass of {@link JEditorPane} that adds a "native" context menu (cut/copy/paste/select all).
- * @since 5885
+ * Subclass of {@link JEditorPane} that adds a "native" context menu (cut/copy/paste/select all)
+ * and effectively uses JOSM user agent when performing HTTP request in {@link #setPage(URL)} method.
+ * @since 5886
  */
 public class JosmEditorPane extends JEditorPane {
@@ -59,3 +64,14 @@
         setText(text);
     }
+
+    @Override
+    protected InputStream getStream(URL page) throws IOException {
+        URLConnection conn = Utils.setupURLConnection(page.openConnection());
+        InputStream result = conn.getInputStream();
+        String type = conn.getContentType();
+        if (type != null) {
+            setContentType(type);
+        }
+        return result;
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextArea.java	(revision 5887)
@@ -7,5 +7,5 @@
 /**
  * Subclass of {@link JTextArea} that adds a "native" context menu (cut/copy/paste/select all).
- * @since 5885
+ * @since 5886
  */
 public class JosmTextArea extends JTextArea {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 5887)
@@ -7,5 +7,5 @@
 /**
  * Subclass of {@link JTextField} that adds a "native" context menu (cut/copy/paste/select all).
- * @since 5885
+ * @since 5886
  */
 public class JosmTextField extends JTextField {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 5887)
@@ -39,5 +39,5 @@
      * @param menu The popup menu to display
      * @param checkEnabled if {@code true}, the popup menu will only be displayed if the component triggering the mouse event is enabled
-     * @since 5885
+     * @since 5886
      */
     public PopupMenuLauncher(JPopupMenu menu, boolean checkEnabled) {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java	(revision 5887)
@@ -34,5 +34,5 @@
  * <li>Select All</li>
  * </ul>
- * @since 5885
+ * @since 5886
  */
 public class TextContextualPopupMenu extends JPopupMenu {
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 5886)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 5887)
@@ -586,9 +586,20 @@
      */
     public static InputStream openURL(URL url) throws IOException {
-        URLConnection connection = url.openConnection();
-        connection.setRequestProperty("User-Agent", Version.getInstance().getFullAgentString());
-        connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
-        connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
-        return connection.getInputStream();
+        return setupURLConnection(url.openConnection()).getInputStream();
+    }
+
+    /***
+     * Setups the given URL connection to match JOSM needs by setting its User-Agent and timeout properties.
+     * @param connection The connection to setup
+     * @return {@code connection}, with updated properties
+     * @since 5887
+     */
+    public static URLConnection setupURLConnection(URLConnection connection) {
+        if (connection != null) {
+            connection.setRequestProperty("User-Agent", Version.getInstance().getFullAgentString());
+            connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+            connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
+        }
+        return connection;
     }
 
