epugh opened a new pull request, #5048: URL: https://github.com/apache/solr/pull/5048
## Summary - The Stream screen (`#/<collection>/stream`) sent the streaming expression as a GET query-string parameter. A sufficiently large expression could be rejected by the server (URL/header length limits) before ever reaching the stream handler, and the UI had no error handling for a failed request, so it just hung with no feedback - matching the original 2016 report exactly. - Added a `queryPost` action to the `Query` Angular service: same request shape as the existing `query` action, but sent as a form-encoded (`application/x-www-form-urlencoded`) POST body instead of a GET query string. `StreamHandler` (and Solr's generic request dispatch) already support this transparently - no server-side changes needed. - Switched `stream.js`'s `doStream()` to use `queryPost`. Both the success and error paths now go through one shared response handler that falls back to showing the raw response body if it isn't valid JSON, instead of letting an unguarded `JSON.parse` throw uncaught - this is what actually produced the original "UI hangs silently" symptom whenever the server's error body wasn't parseable JSON. - Added `AdminUiStreamScreenTest#testLargeExpressionSucceedsViaUi`: a >16KB expression that a GET request would have failed on. Verified it fails against the pre-fix GET-based code and passes with the POST fix. Added `testFailedRequestShowsErrorInsteadOfHanging` to cover a failed request surfacing an error instead of a blank screen. ## Test plan - [x] `AdminUiStreamScreenTest` (3 tests) passes with the fix. - [x] `testLargeExpressionSucceedsViaUi` confirmed to fail against the original GET-based `stream.js` and pass with the POST-based fix (regression-tested both ways). - [x] Confirmed live in a real browser via Selenium that a failed request now shows an error in the response pane instead of leaving the screen blank. https://issues.apache.org/jira/browse/SOLR-9759 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
