Commit 7c73ba4b authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Make loop more efficient as pointed out by Roy


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188094 13f79535-47bb-0310-9956-ffa450edef68
parent bda8ddde
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -162,12 +162,12 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
        }
        else if (r->content_type) {
            const char **type = provider->types;
            size_t len = strcspn(r->content_type, "; \t");
            AP_DEBUG_ASSERT(type != NULL);
            while (*type) {
                /* Handle 'content-type;charset=...' correctly */
                size_t len = strcspn(r->content_type, "; \t");
                if (strlen(*type) == len
                    && strncmp(*type, r->content_type, len) == 0) {
                if (strncmp(*type, r->content_type, len) == 0
                    && (*type)[len] == '\0') {
                    match = 1;
                    break;
                }