Yicong-Huang commented on PR #53267: URL: https://github.com/apache/spark/pull/53267#issuecomment-3614579831
> @zhengruifeng How about adding a new test to [UISuite](https://github.com/apache/spark/blob/master/core/src/test/scala/org/apache/spark/ui/UISuite.scala)? > > I think you can write a test like as follows. > > * Add `spark.ui.allowFramingFrom` to a conf with a value which includes newline characters. > * Create Jetty server and pass the conf, add a ServletContext to the server. > * Access to a URL located on the server using `HttpURLConnection`. > * Check if the value of response header `X-Frame-Options` contains no newline characters and replaced them with white spaces. > > You can find similar code in `UISuite`. I followed this logic and created the test in [this commit](https://github.com/apache/spark/commit/f3620163f477811886aaa45d412cdd4a98081046). As I don't have write access to ruifeng's branch, I pushed the commit in my fork. -- 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]
