Changeset 15969 in josm for trunk


Ignore:
Timestamp:
2020-03-01T01:02:24+01:00 (5 years ago)
Author:
simon04
Message:

see #18812 - OsmApi, OsmServerReader, NameFinder: specify Accept=application/xml, */*;q=0.8

Location:
trunk/src/org/openstreetmap/josm/io
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/NameFinder.java

    r13901 r15969  
    6767     */
    6868    public static List<SearchResult> query(final URL url) throws IOException {
    69         final HttpClient connection = HttpClient.create(url);
     69        final HttpClient connection = HttpClient.create(url)
     70                .setAccept("application/xml, */*;q=0.8");
    7071        Response response = connection.connect();
    7172        if (response.getResponseCode() >= 400) {
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r15007 r15969  
    660660            try {
    661661                url = new URL(new URL(getBaseUrl()), urlSuffix);
    662                 final HttpClient client = HttpClient.create(url, requestMethod).keepAlive(false);
     662                final HttpClient client = HttpClient.create(url, requestMethod)
     663                        .keepAlive(false)
     664                        .setAccept("application/xml, */*;q=0.8");
    663665                activeConnection = client;
    664666                if (fastFail) {
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r15784 r15969  
    176176
    177177            final HttpClient client = HttpClient.create(url, httpMethod)
     178                    .setAccept("application/xml, */*;q=0.8")
    178179                    .setFinishOnCloseOutput(false)
    179180                    .setReasonForRequest(reason)
Note: See TracChangeset for help on using the changeset viewer.