Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Issue #696: browser-engine-system: Clear "X-Requested-With" header when loading URLs. #699

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

pocmo
Copy link
Contributor

@pocmo pocmo commented Sep 4, 2018

Yet another WebView thing.. :)

Closes #696

@codecov
Copy link

codecov bot commented Sep 4, 2018

Codecov Report

Merging #699 into master will increase coverage by 0.01%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #699      +/-   ##
============================================
+ Coverage     78.65%   78.66%   +0.01%     
  Complexity     1125     1125              
============================================
  Files           158      158              
  Lines          4085     4087       +2     
  Branches        600      600              
============================================
+ Hits           3213     3215       +2     
  Misses          578      578              
  Partials        294      294
Impacted Files Coverage Δ Complexity Δ
...mponents/browser/engine/system/SystemEngineView.kt 73.46% <0%> (ø) 19 <0> (ø) ⬇️
...nents/browser/engine/system/SystemEngineSession.kt 87.69% <100%> (+0.39%) 40 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c6b57a3...91038db. Read the comment docs.

Copy link
Contributor

@csadilek csadilek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 nits. Otherwise, 🚢 !

@@ -29,12 +37,12 @@ class SystemEngineSession(private val defaultSettings: Settings? = null) : Engin
val internalView = currentView()

if (internalView == null) {
// We can't load a URL without a WebView. So let's just remember the URL here until
// We can't load al URL without a WebView. So let's just remember the URL here until
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

@@ -13,6 +13,14 @@ import kotlinx.coroutines.experimental.launch
import mozilla.components.concept.engine.Settings
import mozilla.components.concept.engine.request.RequestInterceptor

internal val additionalHeaders = HashMap<String, String>().apply {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use mutableMapOf/mapOf("X-Requested-With" to "")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's nicer. I'll update :)

@pocmo pocmo merged commit 57efe89 into mozilla-mobile:master Sep 4, 2018
@pocmo pocmo deleted the x-requested-with branch September 4, 2018 14:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants