Changeset 9912 in josm for trunk


Ignore:
Timestamp:
2016-03-02T13:08:00+01:00 (9 years ago)
Author:
simon04
Message:

fix #12587 - fix NPE in HttpClient

File:
1 edited

Legend:

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

    r9810 r9912  
    271271                if (uncompressAccordingToContentDisposition && Compression.NONE.equals(compression)) {
    272272                    final String contentDisposition = getHeaderField("Content-Disposition");
    273                     final Matcher matcher = Pattern.compile("filename=\"([^\"]+)\"").matcher(contentDisposition);
     273                    final Matcher matcher = Pattern.compile("filename=\"([^\"]+)\"").matcher(contentDisposition != null ? contentDisposition : "");
    274274                    if (matcher.find()) {
    275275                        Main.debug("Uncompressing input stream according to Content-Disposition header: {0}", contentDisposition);
Note: See TracChangeset for help on using the changeset viewer.