Match request Accept-Charset with response Content-Type. Extract the response charset from the Content-Type field - the charset is after the semicolon. Loop through the charsets in the request's Accept-Charset field. If the Accept-Charset value is a wildcard, do not attempt to match. Otherwise match and note the highest q value. If after the loop the q value is -1, indicating no match,
| 686 | |
| 687 | */ |
| 688 | static inline bool |
| 689 | does_charset_match(char *charset1, char *charset2) |
| 690 | { |
| 691 | return (is_asterisk(charset1) || is_empty(charset1) || (strcasecmp(charset1, charset2) == 0)); |
| 692 | } |
| 693 | |
| 694 | float |
| 695 | HttpTransactCache::calculate_quality_of_accept_charset_match(MIMEField *accept_field, MIMEField *content_field, |
no test coverage detected