This repository has been archived by the owner. It is now read-only.
[IP-474] Fix Query suggestions disappearing randomly #344
Conversation
|
Is this a fix from FF? Or you did your own way? |
|
The firefox fix involves ripping out AlamoFire out of the entire project and replacing it with a URLRequest based solution. I tried porting that, but it has too many far reaching dependencies, so instead I wrote this home grown solution to the bug for now, hoping that in the future we will fix this by upgrading to the most recent version of FF. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Some result suggestion providers (mainly google) return ASCII formatted JSON instead of UTF-8 formatted JSON. To counter this, we first try to decode the result provider data using UTF-8, but retry with ASCII if that fails.
It has been discussed to check the header data, but since that is misleading in some cases (e.g. Google gives
gzipas the encoding), this way is more robust.Firefox solves this a different way by completely replacing AlamoFire in the project. I advocate that we should update our codebase with the FF codebase at some point, but for now this fixes the issue.
Pull Request Checklist
Bug 12345678 - This fixes something something[needsuplift]NSLocalizableString()Screenshots
n/a
Notes for testing this patch
Try to force the search engine to reply with umlauts or other special characters. A string that tripped up the query suggestion before was
un, because the result containedunwetter münchen. Also good isfc bayern mbecause the results will includefc augsburg is viel besser als münchenor something.