| 824 | } |
| 825 | |
| 826 | bool |
| 827 | HttpTransactCache::match_content_encoding(MIMEField *accept_field, const char *encoding_identifier) |
| 828 | { |
| 829 | Str *a_value; |
| 830 | const char *a_raw; |
| 831 | StrList a_values_list; |
| 832 | if (!accept_field) { |
| 833 | return false; |
| 834 | } |
| 835 | // TODO: Should we check the return value (count) here? |
| 836 | accept_field->value_get_comma_list(&a_values_list); |
| 837 | |
| 838 | for (a_value = a_values_list.head; a_value; a_value = a_value->next) { |
| 839 | char *a_encoding = nullptr; |
| 840 | StrList a_param_list; |
| 841 | a_raw = a_value->str; |
| 842 | HttpCompat::parse_semicolon_list(&a_param_list, a_raw); |
| 843 | if (a_param_list.head) { |
| 844 | a_encoding = const_cast<char *>(a_param_list.head->str); |
| 845 | } else { |
| 846 | continue; |
| 847 | } |
| 848 | float q; |
| 849 | q = HttpCompat::find_Q_param_in_strlist(&a_param_list); |
| 850 | if (q != 0 && does_encoding_match(a_encoding, encoding_identifier)) { |
| 851 | return true; |
| 852 | } |
| 853 | } |
| 854 | return false; |
| 855 | } |
| 856 | |
| 857 | // TODO: This used to take a length for c_raw, but that was never used, so removed it from the prototype. |
| 858 | static inline bool |
nothing calls this directly
no test coverage detected