diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-12-17 21:48:30 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-12-17 21:49:26 -0800 |
commit | abe3f27fdb6d1cd90189f423ffb4ec7e485d1b72 (patch) | |
tree | b08bcc1f70ff056b5ef89a7e47cc238c16b6a8fd | |
parent | 034cacce16581c896e0ead523d8c50bf93e532f3 (diff) | |
download | es-public-proxy-abe3f27fdb6d1cd90189f423ffb4ec7e485d1b72.tar.gz es-public-proxy-abe3f27fdb6d1cd90189f423ffb4ec7e485d1b72.zip |
allow scroll GET updates
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | tests/files/scroll/GET_scroll_continue.txt | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f0a8bc..6635095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - sort order field as string or array - bug resulting in some single-line-body test cases not running +- allow scrolling via GET requests ## [0.2.3] - 2020-12-17 @@ -106,7 +106,9 @@ pub async fn filter_request( (&Method::HEAD, ["_search", "scroll"]) | (&Method::OPTIONS, ["_search", "scroll"]) => { Body::empty() } - (&Method::POST, ["_search", "scroll"]) | (&Method::DELETE, ["_search", "scroll"]) => { + (&Method::GET, ["_search", "scroll"]) + | (&Method::POST, ["_search", "scroll"]) + | (&Method::DELETE, ["_search", "scroll"]) => { let whole_body = hyper::body::to_bytes(body) .await .map_err(|e| ProxyError::HttpError(e.to_string()))?; diff --git a/tests/files/scroll/GET_scroll_continue.txt b/tests/files/scroll/GET_scroll_continue.txt new file mode 100644 index 0000000..f65cdbb --- /dev/null +++ b/tests/files/scroll/GET_scroll_continue.txt @@ -0,0 +1,2 @@ +GET /_search/scroll?scroll=5m +{"scroll_id":"DnF1ZXJ5VGhlbkZldGNoBQAAAAABCu0eFlJTb3prdWFpUlNpUmV2eGFEck56bXcAAAAAAQrtHxZSU296a3VhaVJTaVJldnhhRHJOem13AAAAAAEK7SAWUlNvemt1YWlSU2lSZXZ4YURyTnptdwAAAAABCu0hFlJTb3prdWFpUlNpUmV2eGFEck56bXcAAAAAAQrtIhZSU296a3VhaVJTaVJldnhhRHJOem13"} |