Mercurial Hosting > luan
comparison src/org/eclipse/jetty/server/AsyncHttpConnection.java @ 965:866f2e801618
handle() returns void
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 14 Oct 2016 02:19:21 -0600 |
parents | 4b6216fa9cec |
children | 5ee36654b383 |
comparison
equal
deleted
inserted
replaced
964:768414c16e10 | 965:866f2e801618 |
---|---|
50 super(connector,endpoint,server); | 50 super(connector,endpoint,server); |
51 _asyncEndp=(AsyncEndPoint)endpoint; | 51 _asyncEndp=(AsyncEndPoint)endpoint; |
52 } | 52 } |
53 | 53 |
54 @Override | 54 @Override |
55 public Connection handle() throws IOException | 55 public void handle() throws IOException |
56 { | 56 { |
57 Connection connection = this; | |
58 boolean some_progress = false; | 57 boolean some_progress = false; |
59 boolean progress = true; | 58 boolean progress = true; |
60 | 59 |
61 try | 60 try |
62 { | 61 { |
63 setCurrentConnection(this); | 62 setCurrentConnection(this); |
64 | 63 |
65 // While progress and the connection has not changed | 64 // While progress and the connection has not changed |
66 while (progress && connection==this) | 65 while (progress) |
67 { | 66 { |
68 progress=false; | 67 progress=false; |
69 try | 68 try |
70 { | 69 { |
71 // Parse more input | 70 // Parse more input |
106 { | 105 { |
107 if (generatorComplete) | 106 if (generatorComplete) |
108 { | 107 { |
109 // Reset the parser/generator | 108 // Reset the parser/generator |
110 progress=true; | 109 progress=true; |
111 | |
112 // look for a switched connection instance? | |
113 if (_response.getStatus()==HttpStatus.SWITCHING_PROTOCOLS_101) | |
114 { | |
115 Connection switched=(Connection)_request.getAttribute("org.eclipse.jetty.io.Connection"); | |
116 if (switched!=null) | |
117 connection=switched; | |
118 } | |
119 | 110 |
120 reset(); | 111 reset(); |
121 | 112 |
122 // TODO Is this still required? | 113 // TODO Is this still required? |
123 if (!_generator.isPersistent() && !_endp.isOutputShutdown()) | 114 if (!_generator.isPersistent() && !_endp.isOutputShutdown()) |
160 if (_endp instanceof SelectChannelEndPoint) | 151 if (_endp instanceof SelectChannelEndPoint) |
161 ((SelectChannelEndPoint)_endp).getChannel().close(); | 152 ((SelectChannelEndPoint)_endp).getChannel().close(); |
162 } | 153 } |
163 } | 154 } |
164 } | 155 } |
165 return connection; | |
166 } | 156 } |
167 | 157 |
168 public void onInputShutdown() throws IOException | 158 public void onInputShutdown() throws IOException |
169 { | 159 { |
170 // If we don't have a committed response and we are not suspended | 160 // If we don't have a committed response and we are not suspended |