Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 999:74b9daf2826c
simplify Response
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 19 Oct 2016 00:59:46 -0600 |
parents | d9cfec64899c |
children | 39154cfa58e4 |
comparison
equal
deleted
inserted
replaced
998:bf176925e00f | 999:74b9daf2826c |
---|---|
113 private int _version = -2; // UNKNOWN | 113 private int _version = -2; // UNKNOWN |
114 | 114 |
115 private String _charset; | 115 private String _charset; |
116 private boolean _expect = false; | 116 private boolean _expect = false; |
117 private boolean _expect100Continue = false; | 117 private boolean _expect100Continue = false; |
118 private boolean _expect102Processing = false; | |
119 private boolean _head = false; | 118 private boolean _head = false; |
120 private boolean _host = false; | 119 private boolean _host = false; |
121 private boolean _delayedHandling = false; | 120 private boolean _delayedHandling = false; |
122 private boolean _earlyEOF = false; | 121 private boolean _earlyEOF = false; |
123 | 122 |
430 { | 429 { |
431 throw (e instanceof EofException) ? e:new EofException(e); | 430 throw (e instanceof EofException) ? e:new EofException(e); |
432 } | 431 } |
433 } | 432 } |
434 | 433 |
435 public final boolean isExpecting102Processing() | |
436 { | |
437 return _expect102Processing; | |
438 } | |
439 | |
440 public final int getMaxIdleTime() | 434 public final int getMaxIdleTime() |
441 { | 435 { |
442 if (_connector.server.isLowOnThreads() && _endp.getMaxIdleTime()==_connector.getMaxIdleTime()) | 436 if (_connector.server.isLowOnThreads() && _endp.getMaxIdleTime()==_connector.getMaxIdleTime()) |
443 return 0; | 437 return 0; |
444 if (_endp.getMaxIdleTime()>0) | 438 if (_endp.getMaxIdleTime()>0) |
461 uri=uri.asImmutableBuffer(); | 455 uri=uri.asImmutableBuffer(); |
462 | 456 |
463 _host = false; | 457 _host = false; |
464 _expect = false; | 458 _expect = false; |
465 _expect100Continue = false; | 459 _expect100Continue = false; |
466 _expect102Processing=false; | |
467 _delayedHandling=false; | 460 _delayedHandling=false; |
468 _charset=null; | 461 _charset=null; |
469 | 462 |
470 if(_request.getTimeStamp()==0) | 463 if(_request.getTimeStamp()==0) |
471 _request.setTimeStamp(System.currentTimeMillis()); | 464 _request.setTimeStamp(System.currentTimeMillis()); |
531 value = HttpHeaderValues.CACHE.lookup(value); | 524 value = HttpHeaderValues.CACHE.lookup(value); |
532 switch(HttpHeaderValues.CACHE.getOrdinal(value)) | 525 switch(HttpHeaderValues.CACHE.getOrdinal(value)) |
533 { | 526 { |
534 case HttpHeaderValues.CONTINUE_ORDINAL: | 527 case HttpHeaderValues.CONTINUE_ORDINAL: |
535 _expect100Continue = true; | 528 _expect100Continue = true; |
536 break; | |
537 | |
538 case HttpHeaderValues.PROCESSING_ORDINAL: | |
539 _expect102Processing = true; | |
540 break; | 529 break; |
541 | 530 |
542 default: | 531 default: |
543 String[] values = value.toString().split(","); | 532 String[] values = value.toString().split(","); |
544 for (int i=0;values!=null && i<values.length;i++) | 533 for (int i=0;values!=null && i<values.length;i++) |
551 switch(cb.getOrdinal()) | 540 switch(cb.getOrdinal()) |
552 { | 541 { |
553 case HttpHeaderValues.CONTINUE_ORDINAL: | 542 case HttpHeaderValues.CONTINUE_ORDINAL: |
554 _expect100Continue = true; | 543 _expect100Continue = true; |
555 break; | 544 break; |
556 case HttpHeaderValues.PROCESSING_ORDINAL: | |
557 _expect102Processing = true; | |
558 break; | |
559 default: | 545 default: |
560 _expect = true; | 546 _expect = true; |
561 } | 547 } |
562 } | 548 } |
563 } | 549 } |