From e3d781ed3a2d7364d3179d6a5acc39b5b9b65e29 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Wed, 21 Jul 2021 15:50:34 +0200 Subject: [PATCH 1/2] fix(android): prevent error when no cache-control --- .../java/com/nativescript/https/CacheInterceptor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/platforms/android/java/com/nativescript/https/CacheInterceptor.java b/plugin/platforms/android/java/com/nativescript/https/CacheInterceptor.java index 3797d80..5d05571 100644 --- a/plugin/platforms/android/java/com/nativescript/https/CacheInterceptor.java +++ b/plugin/platforms/android/java/com/nativescript/https/CacheInterceptor.java @@ -11,7 +11,11 @@ public Response intercept(Interceptor.Chain chain ) throws IOException { Request originalRequest = chain.request(); String cacheControlHeader = originalRequest.header("Cache-Control"); Response originalResponse = chain.proceed(originalRequest); - return originalResponse.newBuilder().header("Cache-Control", cacheControlHeader).build(); + if (cacheControlHeader != null) { + return originalResponse.newBuilder().header("Cache-Control", cacheControlHeader).build(); + } else { + return originalResponse; + } } From be86ded6ebf80b7a20b094b143e5fb2aafb4f26a Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Wed, 21 Jul 2021 15:52:33 +0200 Subject: [PATCH 2/2] v3.2.2 --- CHANGELOG.md | 11 +++++++++++ lerna.json | 2 +- plugin/CHANGELOG.md | 11 +++++++++++ plugin/package.json | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be00a9d..c0cedf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.2](https://github.com/farfromrefug/nativescript-https/compare/v3.2.1...v3.2.2) (2021-07-21) + + +### Bug Fixes + +* **android:** prevent error when no cache-control ([e3d781e](https://github.com/farfromrefug/nativescript-https/commit/e3d781ed3a2d7364d3179d6a5acc39b5b9b65e29)) + + + + + ## [3.2.1](https://github.com/farfromrefug/nativescript-https/compare/v3.2.0...v3.2.1) (2021-07-01) diff --git a/lerna.json b/lerna.json index fb7629a..9028a3c 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "plugin" ], - "version": "3.2.1", + "version": "3.2.2", "command": { "publish": { "conventionalCommits": true diff --git a/plugin/CHANGELOG.md b/plugin/CHANGELOG.md index 177c628..8da9f06 100644 --- a/plugin/CHANGELOG.md +++ b/plugin/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [3.2.2](https://github.com/farfromrefug/nativescript-https/compare/v3.2.1...v3.2.2) (2021-07-21) + + +### Bug Fixes + +* **android:** prevent error when no cache-control ([e3d781e](https://github.com/farfromrefug/nativescript-https/commit/e3d781ed3a2d7364d3179d6a5acc39b5b9b65e29)) + + + + + ## [3.2.1](https://github.com/farfromrefug/nativescript-https/compare/v3.2.0...v3.2.1) (2021-07-01) **Note:** Version bump only for package @nativescript-community/https diff --git a/plugin/package.json b/plugin/package.json index cdfb9a1..d22d14b 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript-community/https", - "version": "3.2.1", + "version": "3.2.2", "description": "Nativescript plugin for gestures", "main": "https", "sideEffects": false,