You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2021/10/22 08:01:16 UTC

[Bug 65646] New: GraphQL Request Sampler sets incorrect Content-Type header of text/plain

https://bz.apache.org/bugzilla/show_bug.cgi?id=65646

            Bug ID: 65646
           Summary: GraphQL Request Sampler sets incorrect Content-Type
                    header of text/plain
           Product: JMeter
           Version: 5.4.1
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: bz-apache-org@pwes.mail.pl
  Target Milestone: JMETER_5.5

JSON requests send by GraphQL sampler contain wrong Content-Type header:

    Content-Type: text/plain

which instead should be

    Content-Type: application/json

by default.

One can of course use HTTP Header Manager to set the correct value for all
requests, but I think this is only a workaround, as:

  * the default should not be invalid (text/plain Content-Type is invalid for
conforming GraphQL server),
  * when mixing GraphQL queries with "standard" HTTP Requests with other
content types, adding HTTP Header Manager might require more test
reorganization

So I'd suggest just setting application/json as the default content type for
GraphQL Request Sampler

-- 
You are receiving this mail because:
You are the assignee for the bug.