MCPcopy Create free account
hub / github.com/OpenPrinting/cups / _httpStatus

Function _httpStatus

cups/http-support.c:1489–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1487 */
1488
1489const char * /* O - Localized status string */
1490_httpStatus(cups_lang_t *lang, /* I - Language */
1491 http_status_t status) /* I - HTTP status code */
1492{
1493 const char *s; /* Status string */
1494
1495
1496 switch (status)
1497 {
1498 case HTTP_STATUS_ERROR :
1499 s = strerror(errno);
1500 break;
1501 case HTTP_STATUS_CONTINUE :
1502 s = _("Continue");
1503 break;
1504 case HTTP_STATUS_SWITCHING_PROTOCOLS :
1505 s = _("Switching Protocols");
1506 break;
1507 case HTTP_STATUS_OK :
1508 s = _("OK");
1509 break;
1510 case HTTP_STATUS_CREATED :
1511 s = _("Created");
1512 break;
1513 case HTTP_STATUS_ACCEPTED :
1514 s = _("Accepted");
1515 break;
1516 case HTTP_STATUS_NO_CONTENT :
1517 s = _("No Content");
1518 break;
1519 case HTTP_STATUS_MOVED_PERMANENTLY :
1520 s = _("Moved Permanently");
1521 break;
1522 case HTTP_STATUS_FOUND :
1523 s = _("Found");
1524 break;
1525 case HTTP_STATUS_SEE_OTHER :
1526 s = _("See Other");
1527 break;
1528 case HTTP_STATUS_NOT_MODIFIED :
1529 s = _("Not Modified");
1530 break;
1531 case HTTP_STATUS_BAD_REQUEST :
1532 s = _("Bad Request");
1533 break;
1534 case HTTP_STATUS_UNAUTHORIZED :
1535 case HTTP_STATUS_CUPS_AUTHORIZATION_CANCELED :
1536 s = _("Unauthorized");
1537 break;
1538 case HTTP_STATUS_FORBIDDEN :
1539 s = _("Forbidden");
1540 break;
1541 case HTTP_STATUS_NOT_FOUND :
1542 s = _("Not Found");
1543 break;
1544 case HTTP_STATUS_REQUEST_TOO_LARGE :
1545 s = _("Request Entity Too Large");
1546 break;

Callers 3

cupsdSendErrorFunction · 0.85
httpWriteResponseFunction · 0.85
httpStatusFunction · 0.85

Calls 1

_cupsLangStringFunction · 0.85

Tested by

no test coverage detected