hanicz opened a new pull request, #1095:
URL: https://github.com/apache/knox/pull/1095

   ## What changes were proposed in this pull request?
   
   [KNOX-3198](https://issues.apache.org/jira/browse/KNOX-3198) - Check for 
async supported on SSE requests
   
   This is a QoL change for HA and non-HA SSE requests. For every SSE request 
it checks that async support is turned on. The SSEDispatch is created during 
the first request so there is no way to give a faster error response to the 
user. Now it doesn't fill the logs with stacktraces only logs a single error 
line and gives a proper error response on the request.
   
   ## How was this patch tested?
   
   - Unit tests, manual tests
   - HA and non-HA SSE requests with async support turned on and off
   
   `curl -iku admin:admin-password 
https://localhost:8443/gateway/sandbox2/sservice/sse/3`
   
   ```
   <html>
   <head>
   <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
   <title>Error 500 Async support is not enabled. SSE requests cannot be 
processed.</title>
   </head>
   <body><h2>HTTP ERROR 500 Async support is not enabled. SSE requests cannot 
be processed.</h2>
   <table>
   <tr><th>URI:</th><td>/gateway/sandbox2/sservice/sse/3</td></tr>
   <tr><th>STATUS:</th><td>500</td></tr>
   <tr><th>MESSAGE:</th><td>Async support is not enabled. SSE requests cannot 
be processed.</td></tr>
   <tr><th>SERVLET:</th><td>sandbox2-knox-gateway-servlet</td></tr>
   </table>
   
   </body>
   </html>
   ```
   <img width="971" height="162" alt="Screenshot 2025-10-13 at 15 01 44" 
src="https://github.com/user-attachments/assets/2d7e91ab-1a34-43a4-9116-d1406c4bace0";
 />
   


-- 
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]

Reply via email to