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 2020/04/24 01:31:59 UTC

[Bug 64374] New: Not Able to Capture Response when there is no Content-Type

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

            Bug ID: 64374
           Summary: Not Able to Capture Response when there is no
                    Content-Type
           Product: JMeter
           Version: 5.2.1
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: matias.fornara@abstracta.com.uy
  Target Milestone: JMETER_5.3.0

Created attachment 37196
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37196&action=edit
xml from Simple Data Write

I am testing a Desktop Application that in certain responses does not send a
Content-Type header (that is the app default behavior and cannot be modified). 

This behavior makes that JMeter sets that attribute as an empty string in the
sampler result so when it tries to write the response body it fails with the
following message: "Non-TEXT response data, cannot record: ()".

Apart from that missing header, I can notice that server is responding with
some message because the Content-Length is 101, but I cannot see the actual
response because of this behavior.

The thing is, I understand this is JMeter's expected behavior in these cases
but from a testing perspective, it would be useful that JMeter does not lose
the response even when it is not a String, maybe it can be at least logged in
the JMeter log or specified in the sampler result somehow.

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

[Bug 64374] Not Able to Capture Response when there is no Content-Type header

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64374

--- Comment #2 from Matias Fornara <ma...@abstracta.com.uy> ---
(In reply to Philippe Mouawad from comment #1)
> You can workaround this by using a JSR223 Post Processor that can set the
> content type to a text one.
> 
> As you wrote it, empty content type does not look correct so I don't think
> we should fix this.

Thanks for the workaround, I will definitely use it.

I understand what you say but there are two other things here, one is that
JMeter is doing nothing to defend itself from these kinds of situations.

And the other is that the assertion over that response is being applied as it
was a text response but then it is not able to record it, it is not a
consistent behavior.

Thanks for the quick response.

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

[Bug 64374] Not Able to Capture Response when there is no Content-Type header

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64374

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Matias Fornara from comment #2)
> (In reply to Philippe Mouawad from comment #1)
> > You can workaround this by using a JSR223 Post Processor that can set the
> > content type to a text one.
> > 
> > As you wrote it, empty content type does not look correct so I don't think
> > we should fix this.
> 
> Thanks for the workaround, I will definitely use it.
> 
> I understand what you say but there are two other things here, one is that
> JMeter is doing nothing to defend itself from these kinds of situations.

Such situation is abnormal according to RFC.
How are we supposed whether content is binary or text without content-type ?


> 
> And the other is that the assertion over that response is being applied as
> it was a text response but then it is not able to record it, it is not a
> consistent behavior.


The behaviour is that if it's binary we don't save it to XML
> 
> Thanks for the quick response.

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

[Bug 64374] Not Able to Capture Response when there is no Content-Type header

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64374

Matias Fornara <ma...@abstracta.com.uy> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Summary|Not Able to Capture         |Not Able to Capture
                   |Response when there is no   |Response when there is no
                   |Content-Type                |Content-Type header

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

[Bug 64374] Not Able to Capture Response when there is no Content-Type header

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64374

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
You can workaround this by using a JSR223 Post Processor that can set the
content type to a text one.

As you wrote it, empty content type does not look correct so I don't think we
should fix this.

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