dongjoon-hyun opened a new pull request, #57138:
URL: https://github.com/apache/spark/pull/57138

   ### What changes were proposed in this pull request?
   
   `SubmitRequestServlet.doPost` in the Master REST submission server used to 
read the
   entire request body into a `String` before any validation. This PR bounds 
that read
   by a new config `spark.master.rest.maxRequestBodySize` (default `100m`): it 
rejects
   early when `Content-Length` exceeds the limit, and otherwise reads at most 
`limit + 1`
   bytes so an oversized body is caught even when `Content-Length` is missing 
or wrong.
   Over-limit requests get HTTP `413` (`SC_REQUEST_ENTITY_TOO_LARGE`).
   
   ### Why are the changes needed?
   
   To improve the robustness of Spark Master REST API.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. A submit request whose body exceeds 
`spark.master.rest.maxRequestBodySize`
   (default 100 MiB) is now rejected with HTTP 413. The default is generous 
enough that
   legitimate submissions are unaffected.
   
   ### How was this patch tested?
   
   Pass the CIs.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Opus 4.8


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

Reply via email to