View | Details | Raw Unified | Return to bug 58750
Collapse All | Expand All

(-)java/org/apache/coyote/http11/AbstractHttp11Processor.java (-6 / +29 lines)
Lines 228-233 Link Here
228
228
229
229
230
    /**
230
    /**
231
     * Flag to indicate if the server header should be sent.
232
     */
233
    protected boolean sendServer = true;
234
235
236
    /**
231
     * Instance of the new protocol to use after the HTTP connection has been
237
     * Instance of the new protocol to use after the HTTP connection has been
232
     * upgraded.
238
     * upgraded.
233
     */
239
     */
Lines 512-517 Link Here
512
518
513
519
514
    /**
520
    /**
521
     * Set the send server flag.
522
     */
523
    public void setSendServer(boolean sendServer) {
524
		this.sendServer = sendServer;
525
	}
526
527
    /**
528
     * Get the send server flag.
529
     */
530
    public boolean isSendServer() {
531
		return sendServer;
532
	}
533
534
535
    /**
515
     * Check if the resource could be compressed, if the client supports it.
536
     * Check if the resource could be compressed, if the client supports it.
516
     */
537
     */
517
    private boolean isCompressable() {
538
    private boolean isCompressable() {
Lines 1566-1577 Link Here
1566
        getOutputBuffer().sendStatus();
1587
        getOutputBuffer().sendStatus();
1567
1588
1568
        // Add server header
1589
        // Add server header
1569
        if (server != null) {
1590
        if (sendServer) {
1570
            // Always overrides anything the app might set
1591
	        if (server != null) {
1571
            headers.setValue("Server").setString(server);
1592
	            // Always overrides anything the app might set
1572
        } else if (headers.getValue("Server") == null) {
1593
	            headers.setValue("Server").setString(server);
1573
            // If app didn't set the header, use the default
1594
	        } else if (headers.getValue("Server") == null) {
1574
            getOutputBuffer().write(Constants.SERVER_BYTES);
1595
	            // If app didn't set the header, use the default
1596
	            getOutputBuffer().write(Constants.SERVER_BYTES);
1597
	        }
1575
        }
1598
        }
1576
1599
1577
        int size = headers.size();
1600
        int size = headers.size();

Return to bug 58750