Thank you Artem,

I made a little comment on PR.

Just to be sure I understand the PR:

   - You set HttpClientContext.PROXY_AUTH_STATE so that it is used if
   updated

But is it correct to store it as:

   - "http.auth.proxy-scope" + this

Because we'll end per Thread with :

   - Number of Requests in Plan * Number of Threads AuthStates

Regards


On Mon, Aug 27, 2018 at 3:43 PM Artem Fedorov <artem.fedo...@blazemeter.com>
wrote:

> Hi Philippe
>
> https://github.com/apache/jmeter/pull/397
>
> Let's discuss the details in the PR
>
> Thanks,
> Artem
>
> On Sun, Aug 26, 2018 at 12:04 AM, Philippe Mouawad <
> philippe.moua...@gmail.com> wrote:
>
> > Hello Artem,
> > Go ahead and propose a patch or PR.
> > It will be a clearer base to discuss.
> >
> > Thank you
> >
> > On Wed, Aug 22, 2018 at 10:56 AM Artem Fedorov <
> > artem.fedo...@blazemeter.com>
> > wrote:
> >
> > > I work with the latest JMeter version from github
> > > (revision f27c31590cf07bc8427663b62fc22d6d650b95af)
> > >
> > > I create a Thread Group with 1 loop and 1 user. This Thread Group
> > contains
> > > View Results Tree (Listener) and HTTP Resuest (Sampler)
> > >
> > > Configuration of HTTP Sampler:
> > >
> > >         <HTTPSamplerProxy guiclass="HttpTestSampleGui"
> > > > testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true">
> > > >           <elementProp name="HTTPsampler.Arguments"
> > > > elementType="Arguments" guiclass="HTTPArgumentsPanel"
> > > testclass="Arguments"
> > > > testname="User Defined Variables" enabled="true">
> > > >             <collectionProp name="Arguments.arguments"/>
> > > >           </elementProp>
> > > >           <stringProp name="HTTPSampler.domain"></stringProp>
> > > >           <stringProp name="HTTPSampler.port"></stringProp>
> > > >           <stringProp name="HTTPSampler.protocol"></stringProp>
> > > >           <stringProp
> name="HTTPSampler.contentEncoding"></stringProp>
> > > >           <stringProp name="HTTPSampler.path">http://blazedemo.com
> > > > </stringProp>
> > > >           <stringProp name="HTTPSampler.method">GET</stringProp>
> > > >           <boolProp name="HTTPSampler.follow_
> > redirects">true</boolProp>
> > > >           <boolProp
> name="HTTPSampler.auto_redirects">false</boolProp>
> > > >           <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
> > > >           <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</
> > boolProp>
> > > >           <stringProp
> name="HTTPSampler.embedded_url_re"></stringProp>
> > > >           <stringProp name="HTTPSampler.proxyHost">
> > localhost</stringProp>
> > > >           <stringProp name="HTTPSampler.proxyPort">3321</stringProp>
> > > >           <stringProp name="HTTPSampler.proxyUser">artem</stringProp>
> > > >           <stringProp name="HTTPSampler.proxyPass">artem</stringProp>
> > > >           <stringProp
> name="HTTPSampler.connect_timeout"></stringProp>
> > > >           <stringProp name="HTTPSampler.response_
> > timeout"></stringProp>
> > > >         </HTTPSamplerProxy>
> > >
> > >
> > > When I run this Test Plan I see 1 sample in the View Results Tree, but
> in
> > > the access.log of squid I see 2 request from JMeter.
> > >
> > > 1534844834.248      0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > > 1534844834.320     52 127.0.0.1 TCP_MISS/200 8077 GET
> > > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> > >
> > >
> > > So, in real test each Sampler will send 2 requests:
> > > - 1st without authentication data (and will receive 407 http response
> > code)
> > >  - TCP_DENIED/407
> > > - 2nd with authentication data(username/password/type) - will be a
> > success
> > > - TCP_MISS/200
> > >
> > > JMeter (httpclient) send 1st request for detect authentication type
> > > (Basic/Digest/NTLM/SPNEGO/Kerberos) which use proxy server.
> > > If we will have 2 loops the JMeter will send 4 requests, 3 loops = 6
> > > requests etc. I would like to reduce number of request to the proxy
> > server
> > > and make request for detect authentication type once at the start of
> the
> > > loop
> > >
> > > Artem
> > >
> > > On Wed, Aug 22, 2018 at 12:26 AM, Philippe Mouawad <
> > > p.moua...@ubik-ingenierie.com> wrote:
> > >
> > > > Hello Artem,
> > > > I am not sure to understand.
> > > >
> > > > Can you clarify with an example or reformulating what you mean by
> HTTP
> > > > Request that use proxy with authentication.
> > > >
> > > > and also clarify what’s after that, it’s really not clear for me.
> > > >
> > > > Thank you
> > > >
> > > > On Tuesday, August 21, 2018, Artem Fedorov <
> > artem.fedo...@blazemeter.com
> > > >
> > > > wrote:
> > > >
> > > > > HI All
> > > > >
> > > > > I configure HTTP Request that use proxy with authentication
> > > > >
> > > > > In proxy log I can see, that JMeter *always send 2 requests*:  (I
> > used
> > > > > `squid` in tests)
> > > > >
> > > > > 1534844834.248      0 127.0.0.1 TCP_DENIED/407 4056 GET
> > > > > > http://blazedemo.com/ - HIER_NONE/- text/html
> > > > > > 1534844834.320     52 127.0.0.1 TCP_MISS/200 8077 GET
> > > > > > http://blazedemo.com/ artem HIER_DIRECT/54.93.131.97 text/html
> > > > >
> > > > >
> > > > > The first request JMeter send without authentication options,
> because
> > > > this
> > > > > options are create after server got a response with 401/407 code.
> > > > >
> > > > > In performance test I'll see the following log: (50 % of all
> requests
> > > are
> > > > > send without authentication options) - IMO this is incorrect load
> of
> > > > proxy
> > > > > server or we lose a lot of time for create authentication scheme
> for
> > > each
> > > > > request
> > > > >
> > > > > - TCP_DENIED/407 (without proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > - TCP_DENIED/407 (without proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > - TCP_DENIED/407 (without proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > ....
> > > > >
> > > > > The first request (the response for this request) use by httpclient
> > for
> > > > > detect Standard authentication type
> > > (Basic/Digest/NTLM/SPNEGO/Kerberos).
> > > > I
> > > > > think If we have not dynamic proxy we can *reuse* knowledges about
> > > > > authentication type in the second and subsequent requests.
> > > > > After such changes we will see the following log:
> > > > >
> > > > > - TCP_DENIED/407 (without proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > - TCP_MISS/200 (with proxy authentication)
> > > > > ....
> > > > >
> > > > > What do you think about such changes? If all is OK I can contribute
> > the
> > > > fix
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Artem
> > > > >
> > > >
> > > >
> > > > --
> > > > Cordialement.
> > > > Philippe Mouawad.
> > > > Ubik-Ingénierie
> > > >
> > > > UBIK LOAD PACK Web Site <http://www.ubikloadpack.com/>
> > > >
> > > > UBIK LOAD PACK on TWITTER <https://twitter.com/ubikloadpack>
> > > >
> > >
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
> >
>


-- 
Cordialement.
Philippe Mouawad.

Reply via email to