equal
deleted
inserted
replaced
192 throw protocolException("Invalid status line: \"%s\"", statusLine); |
192 throw protocolException("Invalid status line: \"%s\"", statusLine); |
193 } |
193 } |
194 if (statusLine.length() < 12) { |
194 if (statusLine.length() < 12) { |
195 throw protocolException("Invalid status line: \"%s\"", statusLine); |
195 throw protocolException("Invalid status line: \"%s\"", statusLine); |
196 } |
196 } |
197 responseCode = Integer.parseInt(statusLine.substring(9, 12)); |
197 try { |
|
198 responseCode = Integer.parseInt(statusLine.substring(9, 12)); |
|
199 } catch (NumberFormatException nfe) { |
|
200 throw protocolException("Invalid status line: \"%s\"", statusLine); |
|
201 } |
|
202 // response code expected to be a 3-digit integer (RFC-2616, section 6.1.1) |
|
203 if (responseCode < 100) { |
|
204 throw protocolException("Invalid status line: \"%s\"", statusLine); |
|
205 } |
198 |
206 |
199 state = State.STATUS_LINE_END; |
207 state = State.STATUS_LINE_END; |
200 } |
208 } |
201 |
209 |
202 private void maybeStartHeaders(ByteBuffer input) { |
210 private void maybeStartHeaders(ByteBuffer input) { |