summaryrefslogtreecommitdiffstats
path: root/src/server.go
AgeCommit message (Collapse)Author
2024-03-05Update parseGetParams to call strconv.Atoi when params are validonee-only
2024-03-05Update error return position according to conventiononee-only
2024-03-05Remove duplicate codeonee-only
2024-01-21Avoid deadlocks by adding a 2 second timeout to GET / endpointJunegunn Choi
Because fzf processes HTTP GET requests in the main event loop, accessing the endpoint from within execute/transform actions would result in a deadlock and hang fzf indefinitely. This commit sets a 2 second timeout to avoid the deadlock.
2023-12-16Terminate simple server success response with double CRLF (#3542)Jan Verbeek
The simple success case had only the status line plus a single CRLF, and pedantic HTTP client implementations (`hyper`) stumbled over this. A double CRLF makes it OK. Fixes #3541.
2023-11-05Add --listen-unsafe=ADDR to allow remote process execution (#3498)Junegunn Choi
2023-11-04Fix failing test caseJunegunn Choi
2023-11-04Allow accepting remote connectionsJunegunn Choi
Close #3498 # FZF_API_KEY is required for a non-localhost listen address FZF_API_KEY=xxx fzf --listen 0.0.0.0:6266
2023-09-18Add support for limit and offset parameters for GET / endpointJunegunn Choi
Related #3372
2023-09-03Add 'GET /' endpoint for getting the program state (experimental)Junegunn Choi
Related #3372
2023-07-20Add API Keys for fzf --listen (#3374)Boaz Yaniv
2023-03-19Omit port number in `--listen` for automatic port assignmentJunegunn Choi
Close #3200
2022-12-31Only allow local requestsJunegunn Choi
2022-12-25Revert "Add GET endpoints for getting the state of the finder"Junegunn Choi
This reverts commit 750b2a63130fc6b67aaa64c59d42cff428c26b4a. This can cause a deadlock if the endpoints are accessed in the core event loop via execute action. fzf --listen 6266 --bind 'space:execute:curl localhost:6266' Technically, there's no reason to use the API because the information is already available via `{}` and `{q}`, but I'd like to completely remove the risk of misuse.
2022-12-25Add GET endpoints for getting the state of the finderJunegunn Choi
* GET / (or GET /current) * GET /query
2022-12-22Add time and size limit to remote requestsJunegunn Choi
2022-12-21Abort fzf if --listen port is unavailableJunegunn Choi
2022-12-21Only trim CR and NF from the submitted expressionJunegunn Choi
So the trailing space in the following case is respected. curl -XPOST localhost:6266 -d "change-prompt:$(date)> "
2022-12-21Rewrite HTTP server without net/httpJunegunn Choi
This cuts down the binary size from 5.7MB to 3.3MB.