Changeset 15798 in josm


Ignore:
Timestamp:
2020-01-30T11:43:16+01:00 (4 weeks ago)
Author:
simon04
Message:

Http1Client: determine actual HTTP version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Http1Client.java

    r15674 r15798  
    8383            @Override
    8484            public String getResponseVersion() {
    85                 return "HTTP_1";
     85                String headerField = connection.getHeaderField(0);
     86                if (headerField != null && headerField.startsWith("HTTP")) {
     87                    return headerField.replaceFirst(" .*", "");
     88                }
     89                return "HTTP/1";
    8690            }
    8791
Note: See TracChangeset for help on using the changeset viewer.