Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-2110

Can not get content type from string "application/octet-stream"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • None
    • None
    • HttpClient (classic)
    • None

    Description

      I tried to get the org.apache.http.entity.ContentType from a string "application/octet-stream"

      but the following code delivers null:

      org.apache.http.entity.ContentType ctt = ContentType.getByMimeType("application/octet-stream");

      But the reverse operation works as expected:

      String str = ContentType.APPLICATION_OCTET_STREAM.getMimeType();

      delivers the string "application/octet-stream"

       

      Any ideas why?

      Attachments

        Activity

          People

            Unassigned Unassigned
            joergboe@de.ibm.com Joerg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: