jersey
  1. jersey
  2. JERSEY-1333

Accept/produces does not work as expected

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0-m05
    • Fix Version/s: 2.0-m07, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      Suppose a resource:

      @Path(value = "resource")
      public class Resource {
      	@GET
      	public Response getPlain() {
      		return Response.ok("text/plain")
      				.header("HEAD", "text-plain").build();
      	}
      
      	@GET
      	@Produces(value = "text/html")
      	public Response getHtml() {
      		return Response.ok("<html></html>).header("HEAD", "text-html")
      				.build();
      	}
      }
      

      and client request:

      "GET http://localhost:8080/jaxrs_get/resource/ HTTP/1.1"
      "Accept: text/plain"

      the response is:

      <html></html>

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Michal Gajdos
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 30 minutes Time Not Required
              30m