diff options
-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"} |