On Monday 24 October 2011, Roy T. Fielding wrote:
> Wouldn't this be faster as
>
> else if (r->content_type) {
> + /* Handle 'content-type;charset=...' correctly */
> + size_t len = strcspn(r->content_type, "; \t");
> const char **type = provider->types;
> AP_DEBUG_ASSERT(type != NULL);
> while (*type) {
> + if ((strncmp(*type, r->content_type, len) == 0) &&
> + (*type[len] == '\0')) {
> match = 1;
> break;
> }
> type++;
> }
>
> or am I just trying to outwit the compiler?Fixed. Thanks.
