| 1154 | static const char *__unknown_status = "unknow status"; |
| 1155 | |
| 1156 | static const char *http_status(int status) |
| 1157 | { |
| 1158 | size_t i, pos; |
| 1159 | |
| 1160 | i = status / 100; |
| 1161 | if (i < 1 || i > 5) { |
| 1162 | return __unknown_status; |
| 1163 | } |
| 1164 | |
| 1165 | i--; |
| 1166 | pos = status - __maps[i].level; |
| 1167 | |
| 1168 | if (pos >= __maps[i].size) { |
| 1169 | return __unknown_status; |
| 1170 | } |
| 1171 | |
| 1172 | if (__maps[i].hs[pos].title == NULL) { |
| 1173 | return __unknown_status; |
| 1174 | } |
| 1175 | |
| 1176 | return __maps[i].hs[pos].title; |
| 1177 | } |
| 1178 | |
| 1179 | void http_header::append_accept_key(const char* sec_key, string& out) const |
| 1180 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…