| 547 | } |
| 548 | |
| 549 | int ff_http_match_no_proxy(const char *no_proxy, const char *hostname) |
| 550 | { |
| 551 | char *buf, *start; |
| 552 | int ret = 0; |
| 553 | if (!no_proxy) |
| 554 | return 0; |
| 555 | if (!hostname) |
| 556 | return 0; |
| 557 | buf = av_strdup(no_proxy); |
| 558 | if (!buf) |
| 559 | return 0; |
| 560 | start = buf; |
| 561 | while (start) { |
| 562 | char *sep, *next = NULL; |
| 563 | start += strspn(start, " ,"); |
| 564 | sep = start + strcspn(start, " ,"); |
| 565 | if (*sep) { |
| 566 | next = sep + 1; |
| 567 | *sep = '\0'; |
| 568 | } |
| 569 | if (match_host_pattern(start, hostname)) { |
| 570 | ret = 1; |
| 571 | break; |
| 572 | } |
| 573 | start = next; |
| 574 | } |
| 575 | av_free(buf); |
| 576 | return ret; |
| 577 | } |
| 578 | |
| 579 | void ff_log_net_error(void *ctx, int level, const char* prefix) |
| 580 | { |