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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Robert Bourgault du Coudray
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
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

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

glinius@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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Robert Bourgault du Coudray
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 | [hidden email]
› www.bankwest.com.au › find us on    


-----Original Message-----
From: [hidden email] <[hidden email]>
Sent: Friday, 13 September 2019 8:10 PM
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]

______________________________________________________________________
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
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]