Project

General

Profile

Bug #1552 » mod_compress-match-for-complete-mime-type_lighty1.5.patch

stbuehler, 2008-02-15 15:45

View differences:

src/mod_compress.c
624 624

  
625 625
	const char *compression_name = NULL;
626 626
	int compression_type = 0;
627
	buffer *mtime;
627
	buffer *mtime, *content_type;
628 628

  
629 629
	if (con->conf.log_request_handling) TRACE("-- %s", "handling in mod_compress");
630 630

  
......
666 666
	}
667 667

  
668 668
	/* check if mimetype is in compress-config */
669
	content_type = 0;
670
	if (sce->content_type->ptr) {
671
		char *c;
672
		if ( (c = strchr(BUF_STR(sce->content_type), ';')) != 0) {
673
			content_type = buffer_init();
674
			buffer_copy_string_len(content_type, BUF_STR(sce->content_type), c - BUF_STR(sce->content_type)); 
675
		}
676
	}
669 677
	for (m = 0; m < p->conf.compress->used; m++) {
670 678
		data_string *compress_ds = (data_string *)p->conf.compress->data[m];
671 679

  
......
675 683
			return HANDLER_GO_ON;
676 684
		}
677 685

  
678
		if (buffer_is_equal(compress_ds->value, sce->content_type)) {
686
		if (buffer_is_equal(compress_ds->value, sce->content_type)
687
			|| (content_type && buffer_is_equal(compress_ds->value, content_type))) {
679 688
			break;
680 689
		}
681 690
	}
691
	buffer_free(content_type);
682 692

  
683 693
	if (m == p->conf.compress->used) {
684 694
		return HANDLER_GO_ON;
(2-2/2)