[GH-ISSUE #18] Add config option to search via GET request only #14

Closed
opened 2026-02-25 20:34:40 +03:00 by kerem · 7 comments
Owner

Originally created by @raonetwo on GitHub (May 10, 2020).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/18

Originally assigned to: @benbusby on GitHub.

Describe the bug
In Firefox container tabs, if we enable whoogle to always open in a custom container tab. When we set whoogle as default search and search through the address bar, the search target is not propagated and just the url localhost:8888/search which redirects to localhost:8888 and no search results are shown.

To Reproduce
Steps to reproduce the behavior:

  1. Open Firefox and install firefox container tabs.
  2. Open a new tab in any of the default container or create your own container and open a tab in that.
  3. Open whoogle url, Click on the Container tab extension and select always open in selected container.
  4. Make whoogle your default search.
  5. Create a new tab (normal or any container other that the one we set as default for whoogle) and search for something.
  6. No Search results are shown.

Expected behavior
A new container tab was opened with the search results.

Additional context
This extension does the containerised isolation of google urls. Can we have something similar for whoogle.

Originally created by @raonetwo on GitHub (May 10, 2020). Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/18 Originally assigned to: @benbusby on GitHub. **Describe the bug** In Firefox container tabs, if we enable whoogle to always open in a custom container tab. When we set whoogle as default search and search through the address bar, the search target is not propagated and just the url localhost:8888/search which redirects to localhost:8888 and no search results are shown. **To Reproduce** Steps to reproduce the behavior: 1. Open Firefox and install firefox container tabs. 2. Open a new tab in any of the default container or create your own container and open a tab in that. 3. Open whoogle url, Click on the Container tab extension and select always open in selected container. 4. Make whoogle your default search. 5. Create a new tab (normal or any container other that the one we set as default for whoogle) and search for something. 6. No Search results are shown. **Expected behavior** A new container tab was opened with the search results. **Additional context** [This](https://addons.mozilla.org/en-US/firefox/addon/google-container/) extension does the containerised isolation of google urls. Can we have something similar for whoogle.
kerem 2026-02-25 20:34:40 +03:00
Author
Owner

@benbusby commented on GitHub (May 10, 2020):

Looking into this briefly, it looks like this may be an issue with how Firefox Container Tabs handles redirects when a tab is specified to always open in a different container than the one that is being used for search. In this case, the normal POST request that is used for search is discarded along with the POST request data, and is redirected (without any query arguments) to /search, which ends up redirecting back to the home page since there isn't a query to use for search anymore.

I can look into the google container extension you linked and see what I can do, but my initial impression is that this is more of an issue with how the Firefox container tabs extension implemented redirects. I personally use that extension a ton, but I've always kept Whoogle to its own default/no-container tab since there aren't any cookies being stored by that tab anyways.

<!-- gh-comment-id:626384281 --> @benbusby commented on GitHub (May 10, 2020): Looking into this briefly, it looks like this may be an issue with how Firefox Container Tabs handles redirects when a tab is specified to always open in a different container than the one that is being used for search. In this case, the normal POST request that is used for search is discarded along with the POST request data, and is redirected (without any query arguments) to /search, which ends up redirecting back to the home page since there isn't a query to use for search anymore. I can look into the google container extension you linked and see what I can do, but my initial impression is that this is more of an issue with how the Firefox container tabs extension implemented redirects. I personally use that extension a ton, but I've always kept Whoogle to its own default/no-container tab since there aren't any cookies being stored by that tab anyways.
Author
Owner

@raonetwo commented on GitHub (May 10, 2020):

A workaround could be using url query parameters

<!-- gh-comment-id:626386245 --> @raonetwo commented on GitHub (May 10, 2020): A workaround could be using url query parameters
Author
Owner

@raonetwo commented on GitHub (May 11, 2020):

I saw the code, I see that query parameters with the get request are already supported. I went to https://mycroftproject.com/ and created a custom search plugin like below.

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <!-- Created on Mon, 11 May 2020 06:55:58 GMT -->
  <ShortName>WhoogleLocalHost8888</ShortName>
  <Description>Whoogle local deployment </Description>
  <Url type="text/html" method="get" template="http://localhost:8888/search?q={searchTerms}"/>
  <!-- <Image width="16" height="16">GENERATEDLATER</Image> -->
  <Developer>Anon</Developer>
  <InputEncoding>UTF-8</InputEncoding>
  <moz:SearchForm>http://localhost:8888/search</moz:SearchForm>
  <!-- <Url type="application/opensearchdescription+xml" rel="self" template="GENERATEDLATER"/> -->
</OpenSearchDescription>

This now works as expected. You can take a look at https://mycroftproject.com/search-engines.html?name=localhost and install WhoogleLocalHost8888 search engine in firefox.

<!-- gh-comment-id:626512544 --> @raonetwo commented on GitHub (May 11, 2020): I saw the code, I see that query parameters with the get request are already supported. I went to https://mycroftproject.com/ and created a custom search plugin like below. ``` <?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> <!-- Created on Mon, 11 May 2020 06:55:58 GMT --> <ShortName>WhoogleLocalHost8888</ShortName> <Description>Whoogle local deployment </Description> <Url type="text/html" method="get" template="http://localhost:8888/search?q={searchTerms}"/> <!-- <Image width="16" height="16">GENERATEDLATER</Image> --> <Developer>Anon</Developer> <InputEncoding>UTF-8</InputEncoding> <moz:SearchForm>http://localhost:8888/search</moz:SearchForm> <!-- <Url type="application/opensearchdescription+xml" rel="self" template="GENERATEDLATER"/> --> </OpenSearchDescription> ``` This now works as expected. You can take a look at https://mycroftproject.com/search-engines.html?name=localhost and install WhoogleLocalHost8888 search engine in firefox.
Author
Owner

@raonetwo commented on GitHub (May 11, 2020):

I think this can be closed with an update to the README on how to switch to get request.

<!-- gh-comment-id:626532040 --> @raonetwo commented on GitHub (May 11, 2020): I think this can be closed with an update to the README on how to switch to get request.
Author
Owner

@benbusby commented on GitHub (May 11, 2020):

I think I'd prefer to fix this by adding a configuration option to conditionally search only with GET requests instead of POST. As you pointed out, this is already supported since Firefox on iOS is unable to set a POST request as the default search. This way if a user has "GET search only" activated then the opensearch template will update and using with Firefox Container Tabs should work seamlessly.

I'll update the issue to reflect the necessary changes (since this isn't necessarily a bug anymore).

<!-- gh-comment-id:626810003 --> @benbusby commented on GitHub (May 11, 2020): I think I'd prefer to fix this by adding a configuration option to conditionally search only with GET requests instead of POST. As you pointed out, this is already supported since Firefox on iOS is unable to set a POST request as the default search. This way if a user has "GET search only" activated then the opensearch template will update and using with Firefox Container Tabs should work seamlessly. I'll update the issue to reflect the necessary changes (since this isn't necessarily a bug anymore).
Author
Owner

@benbusby commented on GitHub (May 12, 2020):

Hey, just opened a pull request addressing this issue (#36). Feel free to try it out on the feature/query-config branch if you want, otherwise I'll likely merge it in soon since it was a pretty simple fix.

<!-- gh-comment-id:627657425 --> @benbusby commented on GitHub (May 12, 2020): Hey, just opened a pull request addressing this issue (#36). Feel free to try it out on the feature/query-config branch if you want, otherwise I'll likely merge it in soon since it was a pretty simple fix.
Author
Owner

@benbusby commented on GitHub (May 13, 2020):

Closing for now with the merge of #36, please feel free to reopen if anything doesn't work as you expected. Thanks again for bringing this to my attention!

<!-- gh-comment-id:627772446 --> @benbusby commented on GitHub (May 13, 2020): Closing for now with the merge of #36, please feel free to reopen if anything doesn't work as you expected. Thanks again for bringing this to my attention!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whoogle-search#14
No description provided.