comparison src/org/eclipse/jetty/server/Connector.java @ 896:d002da24b510

remove Connector forwarded code
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 06 Oct 2016 23:46:51 -0600
parents 49ff91097d6c
children 821e4634b787
comparison
equal deleted inserted replaced
895:49ff91097d6c 896:d002da24b510
64 public final int port; 64 public final int port;
65 private int _acceptors = 1; 65 private int _acceptors = 1;
66 private int _acceptorPriorityOffset = 0; 66 private int _acceptorPriorityOffset = 0;
67 private boolean _useDNS; 67 private boolean _useDNS;
68 68
69 private String _forwardedHostHeader = HttpHeaders.X_FORWARDED_HOST;
70 private String _forwardedServerHeader = HttpHeaders.X_FORWARDED_SERVER;
71 private String _forwardedForHeader = HttpHeaders.X_FORWARDED_FOR;
72 private String _forwardedProtoHeader = HttpHeaders.X_FORWARDED_PROTO;
73 private String _forwardedCipherSuiteHeader;
74 private String _forwardedSslSessionIdHeader;
75 private boolean _reuseAddress = true; 69 private boolean _reuseAddress = true;
76 70
77 protected int _maxIdleTime = 200000; 71 protected int _maxIdleTime = 200000;
78 protected int _lowResourceMaxIdleTime = -1; 72 protected int _lowResourceMaxIdleTime = -1;
79 protected int _soLingerTime = -1; 73 protected int _soLingerTime = -1;
364 358
365 /* ------------------------------------------------------------ */ 359 /* ------------------------------------------------------------ */
366 public void setResolveNames(boolean resolve) 360 public void setResolveNames(boolean resolve)
367 { 361 {
368 _useDNS = resolve; 362 _useDNS = resolve;
369 }
370
371 /* ------------------------------------------------------------ */
372 /*
373 *
374 * @see #setForwarded(boolean)
375 */
376 public String getForwardedHostHeader()
377 {
378 return _forwardedHostHeader;
379 }
380
381 /* ------------------------------------------------------------ */
382 /**
383 * @param forwardedHostHeader
384 * The header name for forwarded hosts (default x-forwarded-host)
385 * @see #setForwarded(boolean)
386 */
387 public void setForwardedHostHeader(String forwardedHostHeader)
388 {
389 _forwardedHostHeader = forwardedHostHeader;
390 }
391
392 /* ------------------------------------------------------------ */
393 /**
394 * @return the header name for forwarded server.
395 * @see #setForwarded(boolean)
396 */
397 public String getForwardedServerHeader()
398 {
399 return _forwardedServerHeader;
400 }
401
402 /* ------------------------------------------------------------ */
403 /**
404 * @param forwardedServerHeader
405 * The header name for forwarded server (default x-forwarded-server)
406 * @see #setForwarded(boolean)
407 */
408 public void setForwardedServerHeader(String forwardedServerHeader)
409 {
410 _forwardedServerHeader = forwardedServerHeader;
411 }
412
413 /* ------------------------------------------------------------ */
414 /**
415 * @see #setForwarded(boolean)
416 */
417 public String getForwardedForHeader()
418 {
419 return _forwardedForHeader;
420 }
421
422 /* ------------------------------------------------------------ */
423 /**
424 * @param forwardedRemoteAddressHeader
425 * The header name for forwarded for (default x-forwarded-for)
426 * @see #setForwarded(boolean)
427 */
428 public void setForwardedForHeader(String forwardedRemoteAddressHeader)
429 {
430 _forwardedForHeader = forwardedRemoteAddressHeader;
431 }
432
433 /* ------------------------------------------------------------ */
434 /**
435 * Get the forwardedProtoHeader.
436 *
437 * @return the forwardedProtoHeader (default X-Forwarded-For)
438 * @see #setForwarded(boolean)
439 */
440 public String getForwardedProtoHeader()
441 {
442 return _forwardedProtoHeader;
443 }
444
445 /* ------------------------------------------------------------ */
446 /**
447 * Set the forwardedProtoHeader.
448 *
449 * @param forwardedProtoHeader
450 * the forwardedProtoHeader to set (default X-Forwarded-For)
451 * @see #setForwarded(boolean)
452 */
453 public void setForwardedProtoHeader(String forwardedProtoHeader)
454 {
455 _forwardedProtoHeader = forwardedProtoHeader;
456 }
457
458 /* ------------------------------------------------------------ */
459 /**
460 * @return The header name holding a forwarded cipher suite (default null)
461 */
462 public String getForwardedCipherSuiteHeader()
463 {
464 return _forwardedCipherSuiteHeader;
465 }
466
467 /* ------------------------------------------------------------ */
468 /**
469 * @param forwardedCipherSuite
470 * The header name holding a forwarded cipher suite (default null)
471 */
472 public void setForwardedCipherSuiteHeader(String forwardedCipherSuite)
473 {
474 _forwardedCipherSuiteHeader = forwardedCipherSuite;
475 }
476
477 /* ------------------------------------------------------------ */
478 /**
479 * @return The header name holding a forwarded SSL Session ID (default null)
480 */
481 public String getForwardedSslSessionIdHeader()
482 {
483 return _forwardedSslSessionIdHeader;
484 }
485
486 /* ------------------------------------------------------------ */
487 /**
488 * @param forwardedSslSessionId
489 * The header name holding a forwarded SSL Session ID (default null)
490 */
491 public void setForwardedSslSessionIdHeader(String forwardedSslSessionId)
492 {
493 _forwardedSslSessionIdHeader = forwardedSslSessionId;
494 } 363 }
495 364
496 public int getRequestBufferSize() 365 public int getRequestBufferSize()
497 { 366 {
498 return _buffers.getRequestBufferSize(); 367 return _buffers.getRequestBufferSize();