You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Robert Bourgault du Coudray <ro...@bankwest.com.au> on 2019/09/12 06:06:29 UTC

Header Manager not working properly with the "Java" HTTP protocol

Hi,

I have a "Header Manager" with two fields called "Accept-Charset" and "Authorization" and a HTTP Request sampler using this header.
When I select the "HTTPClient4" implementation for the HTTP Request, the GET request is sent with the two fields in the header (which is good).
Now when I select the "Java" implementation, the GET request is sent only with the "Accept-Charset" field in the header; the "Authorization" field is not inserted in the header and is missing.
Is this a limitation of the "Java" implementation or a bug?
How can we get all the header fields populated in the request when using the "Java" implementation protocol?

Thank you for your help,

Robert Bourgault

_______________________________________________________________________________
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
_______________________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

RE: Header Manager not working properly with the "Java" HTTP protocol

Posted by Robert Bourgault du Coudray <ro...@bankwest.com.au>.
Thank you for your answer GLinius, working good now!

Robert Bourgault du Coudray 
Senior QA Engineer | T&T Delivery & Engineering
Level 04 Bankwest Place 300 Murray Street Perth WA 6000
p | (08) 9369 9487  m | 0468 770 721   e | robert.bourgaultducoudray@bankwest.com.au
› www.bankwest.com.au › find us on     


-----Original Message-----
From: glinius@live.com <gl...@live.com> 
Sent: Friday, 13 September 2019 8:10 PM
To: jmeter-user@jakarta.apache.org
Subject: Re: Header Manager not working properly with the "Java" HTTP protocol

Header Manager is working just fine, you can verify what headers are being sent using a sniffer tool like  Wireshark <https://www.wireshark.org/>  

Looking into  JMeter Changelog
<https://jmeter.apache.org/changes_history.html>   for  JMeter 3.2
<https://www.blazemeter.com/blog/whats-new-jmeter-32/>   there is  Bug 60778
<https://bz.apache.org/bugzilla/show_bug.cgi?id=60778>   which references 
getRequestProperty(“Authorization”) always returns null <https://stackoverflow.com/questions/2864062/getrequestpropertyauthorization-always-returns-null>
question on StackOverflow and the  accepted answer
<https://stackoverflow.com/a/2865535/2897748>   explains that the behaviour
is expected. 

So all the headers you define in the HTTP Header Manager are really sent with Java implementation, but you cannot observe some of them in the View Results Tree listener due to the aforementioned security restriction. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com ______________________________________________________________________

_______________________________________________________________________________

This email has been scanned by the Bankwest Email Security System.
_______________________________________________________________________________

_______________________________________________________________________________
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.

This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.

We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
_______________________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

Re: Header Manager not working properly with the "Java" HTTP protocol

Posted by "glinius@live.com" <gl...@live.com>.
Header Manager is working just fine, you can verify what headers are being
sent using a sniffer tool like  Wireshark <https://www.wireshark.org/>  

Looking into  JMeter Changelog
<https://jmeter.apache.org/changes_history.html>   for  JMeter 3.2
<https://www.blazemeter.com/blog/whats-new-jmeter-32/>   there is  Bug 60778
<https://bz.apache.org/bugzilla/show_bug.cgi?id=60778>   which references 
getRequestProperty(“Authorization”) always returns null
<https://stackoverflow.com/questions/2864062/getrequestpropertyauthorization-always-returns-null>  
question on StackOverflow and the  accepted answer
<https://stackoverflow.com/a/2865535/2897748>   explains that the behaviour
is expected. 

So all the headers you define in the HTTP Header Manager are really sent
with Java implementation, but you cannot observe some of them in the View
Results Tree listener due to the aforementioned security restriction. 



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org