Skip to content

ProcessTypes is using a semicolon as a split character, but semicolon can be a part of content type definition #1

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
From Wikipedia:

"A media type is composed of two or more parts: A type, a subtype, and zero or 
more optional parameters. For example, subtypes of text have an optional 
charset parameter that can be included to indicate the character encoding (e.g. 
text/html; charset=UTF-8), and subtypes of multipart type often define a 
boundary between parts. Allowed charset values are defined in the list of IANA 
character sets."

http://en.wikipedia.org/wiki/MIME_type

So content type can contain not only type/subtype but also semicolon and 
parameters. Currently it's impossible to define such content type in 
CombineResourcesFilter.properties as in 
com.codeforces.filter.Configuration.getProcessTypes value from properties file 
is being split on semicolon. 

I can see Two solutions:
1. remove spliting on semicolon 
2. before checking if Configuration.getProcessTypes().contains(contentType) (in 
PostprocessFilter) get a substring of contentType from 0 to first semicolon 
(and trim after that). 

Regards
  Janusz

Original issue reported on code.google.com by [email protected] on 3 Oct 2012 at 8:40

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions