Changeset 9147 in josm


Ignore:
Timestamp:
2015-12-25T14:16:49+01:00 (5 years ago)
Author:
simon04
Message:

Use HTTPS for some wiki requests

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java

    r9086 r9147  
    11081108        public void actionPerformed(ActionEvent e) {
    11091109            try {
    1110                 String base = Main.pref.get("url.openstreetmap-wiki", "http://wiki.openstreetmap.org/wiki/");
     1110                String base = Main.pref.get("url.openstreetmap-wiki", "https://wiki.openstreetmap.org/wiki/");
    11111111                String lang = LanguageInfo.getWikiLanguagePrefix();
    11121112                final List<URI> uris = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r9070 r9147  
    888888    private static ImageResource getIfAvailableWiki(String name, ImageType type) {
    889889        final Collection<String> defaultBaseUrls = Arrays.asList(
    890                 "http://wiki.openstreetmap.org/w/images/",
    891                 "http://upload.wikimedia.org/wikipedia/commons/",
    892                 "http://wiki.openstreetmap.org/wiki/File:"
     890                "https://wiki.openstreetmap.org/w/images/",
     891                "https://upload.wikimedia.org/wikipedia/commons/",
     892                "https://wiki.openstreetmap.org/wiki/File:"
    893893                );
    894894        final Collection<String> baseUrls = Main.pref.getCollection("image-provider.wiki.urls", defaultBaseUrls);
  • trunk/test/unit/org/openstreetmap/josm/tools/ImageProviderTest.java

    r8857 r9147  
    1010import java.io.IOException;
    1111
     12import org.junit.BeforeClass;
    1213import org.junit.Test;
     14import org.openstreetmap.josm.JOSMFixture;
    1315import org.openstreetmap.josm.TestUtils;
    1416
     
    1719 */
    1820public class ImageProviderTest {
     21
     22    /**
     23     * Setup test.
     24     */
     25    @BeforeClass
     26    public static void setUp() {
     27        JOSMFixture.createUnitTestFixture().init();
     28    }
    1929
    2030    /**
     
    4151        assertNotNull(img);
    4252    }
     53
     54    @Test
     55    public void testWikiProtocol() throws Exception {
     56        // https://commons.wikimedia.org/wiki/File:OpenJDK_logo.svg
     57        assertNotNull(ImageProvider.get("wiki://OpenJDK_logo.svg"));
     58    }
    4359}
Note: See TracChangeset for help on using the changeset viewer.