Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 17534)
@@ -17,12 +17,15 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.Future;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.stream.Stream;
 
 import javax.swing.JOptionPane;
@@ -38,4 +41,5 @@
 import org.openstreetmap.josm.gui.io.importexport.AllFormatsImporter;
 import org.openstreetmap.josm.gui.io.importexport.FileImporter;
+import org.openstreetmap.josm.gui.io.importexport.Options;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.AbstractFileChooser;
@@ -96,5 +100,5 @@
      */
     public static Future<?> openFiles(List<File> fileList) {
-        return openFiles(fileList, false);
+        return openFiles(fileList, (Options[]) null);
     }
 
@@ -105,8 +109,22 @@
      * @return the future task
      * @since 11986 (return task)
-     */
+     * @deprecated Since 17534, use {@link OpenFileAction#openFiles(List, Options...)} with {@link Options#RECORD_HISTORY} instead.
+     */
+    @Deprecated
     public static Future<?> openFiles(List<File> fileList, boolean recordHistory) {
+        Options[] options = recordHistory ? new Options[] {Options.RECORD_HISTORY} : null;
+        return openFiles(fileList, options);
+    }
+
+    /**
+     * Open a list of files. The complete list will be passed to batch importers.
+     * @param fileList A list of files
+     * @param options The options to use
+     * @return the future task
+     * @since 17534 ({@link Options})
+     */
+    public static Future<?> openFiles(List<File> fileList, Options... options) {
         OpenFileTask task = new OpenFileTask(fileList, null);
-        task.setRecordHistory(recordHistory);
+        task.setOptions(options);
         return MainApplication.worker.submit(task);
     }
@@ -122,5 +140,5 @@
         private final FileFilter fileFilter;
         private boolean canceled;
-        private boolean recordHistory;
+        private final EnumSet<Options> options = EnumSet.noneOf(Options.class);
 
         /**
@@ -168,7 +186,26 @@
          * Sets whether to save filename in history (for list of recently opened files).
          * @param recordHistory {@code true} to save filename in history (default: false)
-         */
+         * @deprecated since 17534 (use {@link #setOptions} instead).
+         */
+        @Deprecated
         public void setRecordHistory(boolean recordHistory) {
-            this.recordHistory = recordHistory;
+            if (recordHistory) {
+                this.options.add(Options.RECORD_HISTORY);
+            } else {
+                this.options.remove(Options.RECORD_HISTORY);
+            }
+        }
+
+        /**
+         * Set the options for the task.
+         * @param options The options to set
+         * @see Options
+         * @since 17534
+         */
+        public void setOptions(Options[] options) {
+            this.options.clear();
+            if (options != null) {
+                Stream.of(options).filter(Objects::nonNull).forEach(this.options::add);
+            }
         }
 
@@ -178,5 +215,14 @@
          */
         public boolean isRecordHistory() {
-            return recordHistory;
+            return this.options.contains(Options.RECORD_HISTORY);
+        }
+
+        /**
+         * Get the options for this task
+         * @return A set of options
+         * @since 17534
+         */
+        public Set<Options> getOptions() {
+            return Collections.unmodifiableSet(this.options);
         }
 
@@ -340,5 +386,5 @@
             }
 
-            if (recordHistory) {
+            if (this.options.contains(Options.RECORD_HISTORY)) {
                 Collection<String> oldFileHistory = Config.getPref().getList("file-open.history");
                 fileHistory.addAll(oldFileHistory);
@@ -356,4 +402,5 @@
          */
         public void importData(FileImporter importer, List<File> files) {
+            importer.setOptions(this.options.toArray(new Options[0]));
             if (importer.isBatchImporter()) {
                 if (canceled) return;
@@ -373,5 +420,5 @@
                 }
             }
-            if (recordHistory && !importer.isBatchImporter()) {
+            if (this.options.contains(Options.RECORD_HISTORY) && !importer.isBatchImporter()) {
                 for (File f : files) {
                     try {
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/FileImporter.java	(revision 17534)
@@ -6,5 +6,8 @@
 import java.io.File;
 import java.io.IOException;
+import java.util.EnumSet;
 import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
 
 import javax.swing.JOptionPane;
@@ -36,4 +39,6 @@
 
     private boolean enabled;
+
+    protected final EnumSet<Options> options = EnumSet.noneOf(Options.class);
 
     /**
@@ -191,3 +196,15 @@
         this.enabled = enabled;
     }
+
+    /**
+     * Set the options for the {@code FileImporter}.
+     * @param options The options to set
+     * @since 17534
+     */
+    public final void setOptions(Options[] options) {
+        this.options.clear();
+        if (options != null) {
+            Stream.of(options).filter(Objects::nonNull).forEach(this.options::add);
+        }
+    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/JpgImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/JpgImporter.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/JpgImporter.java	(revision 17534)
@@ -8,7 +8,10 @@
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.EnumSet;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
@@ -16,4 +19,5 @@
 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.CachedFile;
 import org.openstreetmap.josm.io.IllegalDataException;
 
@@ -23,4 +27,9 @@
  */
 public class JpgImporter extends FileImporter {
+    /** Check if the filename starts with a borked path ({@link java.io.File#File} drops consecutive {@code /} characters). */
+    private static final Pattern URL_START_BAD = Pattern.compile("^(https?:/)([^/].*)$");
+    /** Check for the beginning of a "good" url */
+    private static final Pattern URL_START_GOOD = Pattern.compile("^https?://.*$");
+
     private GpxLayer gpx;
 
@@ -74,5 +83,5 @@
             List<File> files = new ArrayList<>();
             Set<String> visitedDirs = new HashSet<>();
-            addRecursiveFiles(files, visitedDirs, sel, progressMonitor.createSubTaskMonitor(1, true));
+            addRecursiveFiles(this.options, files, visitedDirs, sel, progressMonitor.createSubTaskMonitor(1, true));
 
             if (progressMonitor.isCanceled())
@@ -90,4 +99,9 @@
     static void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor)
             throws IOException {
+        addRecursiveFiles(EnumSet.noneOf(Options.class), files, visitedDirs, sel, progressMonitor);
+    }
+
+    static void addRecursiveFiles(Set<Options> options, List<File> files, Set<String> visitedDirs, List<File> sel,
+            ProgressMonitor progressMonitor) throws IOException {
 
         if (progressMonitor.isCanceled())
@@ -101,5 +115,6 @@
                         File[] dirFiles = f.listFiles(); // Can be null for some strange directories (like lost+found)
                         if (dirFiles != null) {
-                            addRecursiveFiles(files, visitedDirs, Arrays.asList(dirFiles), progressMonitor.createSubTaskMonitor(1, true));
+                            addRecursiveFiles(options, files, visitedDirs, Arrays.asList(dirFiles),
+                                    progressMonitor.createSubTaskMonitor(1, true));
                         }
                     } else {
@@ -107,5 +122,19 @@
                     }
                 } else {
-                    if (FILE_FILTER.accept(f)) {
+                    /* Check if the path is a web path, and if so, ensure that it is "correct" */
+                    final String path = f.getPath();
+                    Matcher matcherBad = URL_START_BAD.matcher(path);
+                    final String realPath;
+                    if (matcherBad.matches()) {
+                        realPath = matcherBad.replaceFirst(matcherBad.group(1) + "/" + matcherBad.group(2));
+                    } else {
+                        realPath = path;
+                    }
+                    if (URL_START_GOOD.matcher(realPath).matches() && FILE_FILTER.accept(f)
+                            && options.contains(Options.ALLOW_WEB_RESOURCES)) {
+                        try (CachedFile cachedFile = new CachedFile(realPath)) {
+                            files.add(cachedFile.getFile());
+                        }
+                    } else if (FILE_FILTER.accept(f)) {
                         files.add(f);
                     }
Index: trunk/src/org/openstreetmap/josm/gui/io/importexport/Options.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/importexport/Options.java	(revision 17534)
+++ trunk/src/org/openstreetmap/josm/gui/io/importexport/Options.java	(revision 17534)
@@ -0,0 +1,14 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io.importexport;
+
+/**
+ * Options for ImportExport classes. Not all ImportExport classes support all options.
+ * @author Taylor Smock
+ * @since 17534
+ */
+public enum Options {
+    /** Allow import/export of web resources */
+    ALLOW_WEB_RESOURCES,
+    /** Record history. Primarily used in OpenFileAction */
+    RECORD_HISTORY
+}
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java	(revision 17534)
@@ -30,4 +30,7 @@
     public static final PermissionPrefWithDefault OPEN_FILES =
             new PermissionPrefWithDefault("remotecontrol.permission.open-files", false, tr("Open local files"));
+    /** Open web files */
+    public static final PermissionPrefWithDefault ALLOW_WEB_RESOURCES =
+            new PermissionPrefWithDefault("remotecontrol.permission.open-remote-files", false, tr("Open remote files"));
     /** Load imagery layers */
     public static final PermissionPrefWithDefault LOAD_IMAGERY =
@@ -45,4 +48,5 @@
     public static final PermissionPrefWithDefault READ_PROTOCOL_VERSION =
             new PermissionPrefWithDefault("remotecontrol.permission.read-protocolversion", true, tr("Read protocol version"));
+
     /**
      * name of the preference setting to permit the remote operation
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 17534)
@@ -163,4 +163,5 @@
             addRequestHandlerClass(ImportHandler.command, ImportHandler.class, true);
             addRequestHandlerClass(OpenFileHandler.command, OpenFileHandler.class, true);
+            PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.ALLOW_WEB_RESOURCES);
             addRequestHandlerClass(ImageryHandler.command, ImageryHandler.class, true);
             PermissionPrefWithDefault.addPermissionPref(PermissionPrefWithDefault.CHANGE_SELECTION);
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/OpenFileHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/OpenFileHandler.java	(revision 17526)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/OpenFileHandler.java	(revision 17534)
@@ -6,6 +6,8 @@
 import java.io.File;
 import java.util.Arrays;
+import java.util.EnumSet;
 
 import org.openstreetmap.josm.actions.OpenFileAction;
+import org.openstreetmap.josm.gui.io.importexport.Options;
 import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
@@ -43,5 +45,10 @@
     @Override
     protected void handleRequest() throws RequestHandlerErrorException, RequestHandlerBadRequestException {
-        GuiHelper.runInEDTAndWait(() -> OpenFileAction.openFiles(Arrays.asList(new File(args.get("filename")))));
+        EnumSet<Options> options = EnumSet.noneOf(Options.class);
+        if (PermissionPrefWithDefault.ALLOW_WEB_RESOURCES.isAllowed()) {
+            options.add(Options.ALLOW_WEB_RESOURCES);
+        }
+        GuiHelper.runInEDTAndWait(() ->
+            OpenFileAction.openFiles(Arrays.asList(new File(args.get("filename"))), options.toArray(new Options[0])));
     }
 
