Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Dec 25, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant