(stream, state)
| 31 | } |
| 32 | |
| 33 | function responseStatusCode(stream, state) { |
| 34 | var code = stream.match(/^\d+/); |
| 35 | if (!code) return failFirstLine(stream, state); |
| 36 | |
| 37 | state.cur = responseStatusText; |
| 38 | var status = Number(code[0]); |
| 39 | if (status >= 100 && status < 200) { |
| 40 | return "positive informational"; |
| 41 | } else if (status >= 200 && status < 300) { |
| 42 | return "positive success"; |
| 43 | } else if (status >= 300 && status < 400) { |
| 44 | return "positive redirect"; |
| 45 | } else if (status >= 400 && status < 500) { |
| 46 | return "negative client-error"; |
| 47 | } else if (status >= 500 && status < 600) { |
| 48 | return "negative server-error"; |
| 49 | } else { |
| 50 | return "error"; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | function responseStatusText(stream, state) { |
| 55 | stream.skipToEnd(); |
nothing calls this directly
no test coverage detected