You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened?
When i try http://localhost:8080/search?q=test&format=csv&categories=videos this works both on chromium broswer and via terminal using curl :curl "http://localhost:8080/search?q=test&format=csv&categories=videos"
This instead works only on browser: http://localhost:8080/search?q=test&format=json&categories=videos, when i try on terminal curl "http://localhost:8080/search?q=test&format=json&categories=videos" i obtain
<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>
This patch implements a simple JSONEncoder just to fixsearxng#2502 / on the long term
SearXNG needs a data schema for the result items and a json generator for the
result list.
Closes: searxng#2505
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This patch implements a simple JSONEncoder just to fix#2502 / on the long term
SearXNG needs a data schema for the result items and a json generator for the
result list.
Closes: #2505
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Version:
2023.6.16+71b6ff07
docker image: searxng/searxng:latest
What happened?
When i try
http://localhost:8080/search?q=test&format=csv&categories=videos
this works both on chromium broswer and via terminal using curl :curl "http://localhost:8080/search?q=test&format=csv&categories=videos"
This instead works only on browser:
http://localhost:8080/search?q=test&format=json&categories=videos
, when i try on terminalcurl "http://localhost:8080/search?q=test&format=json&categories=videos"
i obtainHow To Reproduce
Run searxng with docker:
update formats on test/settings.yml
restart the docker container:
Now if you try to query the search api with
curl "http://localhost:8080/search?q=test&categories=videos&format=csv"
should be fine.Instead :
curl "http://localhost:8080/search?q=test&categories=videos&format=json"
raises an error 500Expected behavior
The json format should work as the csv does.
Screenshots & Logs
These are the docker container logs:
Any help will be appreciated :)
Thanks!
The text was updated successfully, but these errors were encountered: