| 590 | } |
| 591 | |
| 592 | int ff_http_averror(int status_code, int default_averror) |
| 593 | { |
| 594 | switch (status_code) { |
| 595 | case 400: return AVERROR_HTTP_BAD_REQUEST; |
| 596 | case 401: return AVERROR_HTTP_UNAUTHORIZED; |
| 597 | case 403: return AVERROR_HTTP_FORBIDDEN; |
| 598 | case 404: return AVERROR_HTTP_NOT_FOUND; |
| 599 | case 429: return AVERROR_HTTP_TOO_MANY_REQUESTS; |
| 600 | default: break; |
| 601 | } |
| 602 | if (status_code >= 400 && status_code <= 499) |
| 603 | return AVERROR_HTTP_OTHER_4XX; |
| 604 | else if (status_code >= 500) |
| 605 | return AVERROR_HTTP_SERVER_ERROR; |
| 606 | else |
| 607 | return default_averror; |
| 608 | } |
| 609 | |
| 610 | const char* ff_http_get_new_location(URLContext *h) |
| 611 | { |
no outgoing calls
no test coverage detected