Remove headers in case the setting is disabled after being enabled

This commit is contained in:
Anthony Restaino 2015-10-30 23:43:25 -04:00
parent 6df7cdf331
commit d66f5e4c17

View File

@ -206,6 +206,9 @@ public class LightningView {
if (mPreferences.getRemoveIdentifyingHeadersEnabled()) {
mRequestHeaders.put(HEADER_REQUESTED_WITH, "");
mRequestHeaders.put(HEADER_WAP_PROFILE, "");
} else {
mRequestHeaders.remove(HEADER_REQUESTED_WITH);
mRequestHeaders.remove(HEADER_WAP_PROFILE);
}
settings.setDefaultTextEncodingName(mPreferences.getTextEncoding());