~ubuntu-branches/ubuntu/saucy/tomcat7/saucy

« back to all changes in this revision

Viewing changes to java/org/apache/coyote/Response.java

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-12-06 13:47:08 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20121206134708-xub74b3086g2xwt3
Tags: 7.0.34-0ubuntu1
* New upstream release.
  - d/p/0014-fix-override.patch: Fix FTBFS due to differing dependency
    versions compared to upstream.
* d/p/0015-use-jdbc-pool-default.patch: Make jdbc-pool module the default
  pool implementation for DataSources (LP: #1071817).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
import org.apache.tomcat.util.buf.ByteChunk;
25
25
import org.apache.tomcat.util.http.MimeHeaders;
26
 
import org.apache.tomcat.util.http.parser.AstMediaType;
27
26
import org.apache.tomcat.util.http.parser.HttpParser;
28
 
import org.apache.tomcat.util.http.parser.ParseException;
 
27
import org.apache.tomcat.util.http.parser.MediaType;
29
28
 
30
29
/**
31
30
 * Response object.
435
434
            return;
436
435
        }
437
436
 
438
 
        AstMediaType m = null;
439
 
        HttpParser hp = new HttpParser(new StringReader(type));
 
437
        MediaType m = null;
440
438
        try {
441
 
             m = hp.MediaType();
442
 
        } catch (ParseException e) {
 
439
             m = HttpParser.parseMediaType(new StringReader(type));
 
440
        } catch (IOException e) {
 
441
            // Ignore - null test below handles this
 
442
        }
 
443
        if (m == null) {
443
444
            // Invalid - Assume no charset and just pass through whatever
444
445
            // the user provided.
445
446
            this.contentType = type;