-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetty 12: X-Powered-By header is added 2 times (if enabled) #10309
Comments
Simple reproducer: public class JettyTest {
public static void main(String[] args) throws Exception {
final var server=new Server();
// setup connector
final var http_config = new HttpConfiguration();
final var cust = new ForwardedRequestCustomizer();
http_config.addCustomizer(cust);
http_config.setSendServerVersion(false);
http_config.setSendXPoweredBy(true);
final var connector = new ServerConnector(server, new HttpConnectionFactory(http_config));
connector.setHost(System.getProperty("server.host", "127.0.0.1"));
connector.setPort(Integer.getInteger("server.port", 8081));
server.addConnector(connector);
// startup:
server.start();
server.join();
}
} |
joakime
added a commit
that referenced
this issue
Aug 14, 2023
Opened PR #10310 to address this |
joakime
added a commit
that referenced
this issue
Aug 21, 2023
* Make HttpChannelState responsible for X-Powered-By / Server headers * Remove X-Powered-By handling in HttpGenerator
Basic fix merged in PR #10310 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version(s)
Jetty 12
Jetty Environment
core
Description
If you enable
HttpConfiguration#setSendXPoweredBy(true)
, then Jetty returns the header 2 times (at least with HTTP/1.1):The text was updated successfully, but these errors were encountered: