You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Julien (JIRA)" <ji...@apache.org> on 2010/07/05 11:16:51 UTC

[jira] Created: (HTTPCLIENT-966) Kerberos : KRBError sname include port.

Kerberos : KRBError sname include port.
---------------------------------------

                 Key: HTTPCLIENT-966
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-966
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.1 Alpha2
         Environment: Windows XP SP2
            Reporter: Julien


When trying to contact "http://myhost.mydomain:myport/myApp/"
Kerberos TGS-REQ sname is "myhost.mydomain:myport" and there are KrbException: Server not found in Kerberos database (7).

When trying to open "http://myhost.mydomain:myport/myApp/" in firefox
Kerberos TGS-REQ sname is "myhost.mydomain" and it's work.

i think it's bug, cause sname have not to contain ":myport"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Updated: (HTTPCLIENT-966) Kerberos : KRBError sname include port.

Posted by "Julien (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien updated HTTPCLIENT-966:
------------------------------

    Description: 
When trying to contact "http://myhost.mydomain:myport/myApp/"
Kerberos TGS-REQ sname is "myhost.mydomain:myport" (captured with wireshark) and there are KrbException: Server not found in Kerberos database (7) in my program.

When trying to open "http://myhost.mydomain:myport/myApp/" in firefox
Kerberos TGS-REQ sname is "myhost.mydomain" and it's work.

i think it's a bug, cause sname have not to contain ":myport"

  was:
When trying to contact "http://myhost.mydomain:myport/myApp/"
Kerberos TGS-REQ sname is "myhost.mydomain:myport" and there are KrbException: Server not found in Kerberos database (7).

When trying to open "http://myhost.mydomain:myport/myApp/" in firefox
Kerberos TGS-REQ sname is "myhost.mydomain" and it's work.

i think it's bug, cause sname have not to contain ":myport"


> Kerberos : KRBError sname include port.
> ---------------------------------------
>
>                 Key: HTTPCLIENT-966
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-966
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1 Alpha2
>         Environment: Windows XP SP2
>            Reporter: Julien
>
> When trying to contact "http://myhost.mydomain:myport/myApp/"
> Kerberos TGS-REQ sname is "myhost.mydomain:myport" (captured with wireshark) and there are KrbException: Server not found in Kerberos database (7) in my program.
> When trying to open "http://myhost.mydomain:myport/myApp/" in firefox
> Kerberos TGS-REQ sname is "myhost.mydomain" and it's work.
> i think it's a bug, cause sname have not to contain ":myport"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Thanks.

I've added the test for SSL session attribute to BasicManagedIOSession.getSession (not sure if it can be done in upper calls at the moment). It works.

No problem for contributing. I'll do it once it works.

BR,
Fabrice

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: lundi 19 juillet 2010 17:29
To: HttpComponents Project
Subject: RE: HttpCore NIO & SSL behind proxy

On Mon, 2010-07-19 at 16:04 +0200, DELHOSTE Fabrice wrote:
> Thanks Oleg and Asankha.
> 
> So, as you known, in httpclientasync, I changed the dispatcher to SSL and after the first request (or a while), it gets stuck not publishing the next request.
> 
> After analyzing and comparing HTTP vs HTTPS logs, actually, I may have found my mistake. Changing to SSL dispatcher seems not enough; I must also set the SSL session to the OP_WRITE event in addition to the regular session (in HttpExchangeImpl.requestCompleted):
> 
>   private synchronized void requestCompleted(final ManagedIOSession session) {
>     this.managedSession = session;
>     IOSession iosession = session.getSession();
>     iosession.setAttribute(InternalRequestExecutionHandler.HTTP_EXCHANGE, this);
>     iosession.setEvent(SelectionKey.OP_WRITE);
>     SSLIOSession sslsession = (SSLIOSession) iosession.getAttribute("SSL_SESSION");
>     if (sslsession != null) {
>       sslsession.setEvent(SelectionKey.OP_WRITE);
>     }
>   }
> 
> I guess that comes probably from the way SSLIOSession decorates the iosession.
> 

Fabrice,

The protocol code should always be using the SSL i/o session instead of
the underlying plain i/o session, when available. You may want to
consider tweaking BasicManagedIOSession class to return the instance of
the SSL i/o session in case of a secure route.

> Am I right? Is it the correct way to do it?
> 
> FYI, to achieve SSL as well as HTTP in httpclientasync, I actually made InternalClientEventDispatch a composite of DefaultClientIOEventDispatch and SSLClientIOEventDispatch, forwarding to the right one depending on the scheme of the target host.
> 

Please consider contributing it back to the project.

Cheers

Oleg

> Cheers,
> Fabrice
> 
> -----Original Message-----
> From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of Asankha C. Perera
> Sent: vendredi 16 juillet 2010 21:57
> To: HttpComponents Project
> Subject: Re: HttpCore NIO & SSL behind proxy
> 
> Hi Fabrice
> > Two things you should try:
> > (1) reproducing the problem with a test case. HttpCore has a number of
> > test cases for non-blocking SSL and you could use those as a starting
> > point.
> > (2) reproducing the problem with I/O session event logging on. This
> > should help find out whether I/O interests are set correctly (write
> > events suspended by mistake). Logging is simply indispensable when
> > troubleshooting concurrency issues.
> >    
> You could also try the "-Djavax.net.debug=all" system property, which 
> may give you a hint if the cause is SSL specific
> 
> cheers
> asankha
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2010-07-19 at 16:04 +0200, DELHOSTE Fabrice wrote:
> Thanks Oleg and Asankha.
> 
> So, as you known, in httpclientasync, I changed the dispatcher to SSL and after the first request (or a while), it gets stuck not publishing the next request.
> 
> After analyzing and comparing HTTP vs HTTPS logs, actually, I may have found my mistake. Changing to SSL dispatcher seems not enough; I must also set the SSL session to the OP_WRITE event in addition to the regular session (in HttpExchangeImpl.requestCompleted):
> 
>   private synchronized void requestCompleted(final ManagedIOSession session) {
>     this.managedSession = session;
>     IOSession iosession = session.getSession();
>     iosession.setAttribute(InternalRequestExecutionHandler.HTTP_EXCHANGE, this);
>     iosession.setEvent(SelectionKey.OP_WRITE);
>     SSLIOSession sslsession = (SSLIOSession) iosession.getAttribute("SSL_SESSION");
>     if (sslsession != null) {
>       sslsession.setEvent(SelectionKey.OP_WRITE);
>     }
>   }
> 
> I guess that comes probably from the way SSLIOSession decorates the iosession.
> 

Fabrice,

The protocol code should always be using the SSL i/o session instead of
the underlying plain i/o session, when available. You may want to
consider tweaking BasicManagedIOSession class to return the instance of
the SSL i/o session in case of a secure route.

> Am I right? Is it the correct way to do it?
> 
> FYI, to achieve SSL as well as HTTP in httpclientasync, I actually made InternalClientEventDispatch a composite of DefaultClientIOEventDispatch and SSLClientIOEventDispatch, forwarding to the right one depending on the scheme of the target host.
> 

Please consider contributing it back to the project.

Cheers

Oleg

> Cheers,
> Fabrice
> 
> -----Original Message-----
> From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of Asankha C. Perera
> Sent: vendredi 16 juillet 2010 21:57
> To: HttpComponents Project
> Subject: Re: HttpCore NIO & SSL behind proxy
> 
> Hi Fabrice
> > Two things you should try:
> > (1) reproducing the problem with a test case. HttpCore has a number of
> > test cases for non-blocking SSL and you could use those as a starting
> > point.
> > (2) reproducing the problem with I/O session event logging on. This
> > should help find out whether I/O interests are set correctly (write
> > events suspended by mistake). Logging is simply indispensable when
> > troubleshooting concurrency issues.
> >    
> You could also try the "-Djavax.net.debug=all" system property, which 
> may give you a hint if the cause is SSL specific
> 
> cheers
> asankha
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Thanks Oleg and Asankha.

So, as you known, in httpclientasync, I changed the dispatcher to SSL and after the first request (or a while), it gets stuck not publishing the next request.

After analyzing and comparing HTTP vs HTTPS logs, actually, I may have found my mistake. Changing to SSL dispatcher seems not enough; I must also set the SSL session to the OP_WRITE event in addition to the regular session (in HttpExchangeImpl.requestCompleted):

  private synchronized void requestCompleted(final ManagedIOSession session) {
    this.managedSession = session;
    IOSession iosession = session.getSession();
    iosession.setAttribute(InternalRequestExecutionHandler.HTTP_EXCHANGE, this);
    iosession.setEvent(SelectionKey.OP_WRITE);
    SSLIOSession sslsession = (SSLIOSession) iosession.getAttribute("SSL_SESSION");
    if (sslsession != null) {
      sslsession.setEvent(SelectionKey.OP_WRITE);
    }
  }

I guess that comes probably from the way SSLIOSession decorates the iosession.

Am I right? Is it the correct way to do it?

FYI, to achieve SSL as well as HTTP in httpclientasync, I actually made InternalClientEventDispatch a composite of DefaultClientIOEventDispatch and SSLClientIOEventDispatch, forwarding to the right one depending on the scheme of the target host.

Cheers,
Fabrice

-----Original Message-----
From: Asankha Perera [mailto:asankha.apache@gmail.com] On Behalf Of Asankha C. Perera
Sent: vendredi 16 juillet 2010 21:57
To: HttpComponents Project
Subject: Re: HttpCore NIO & SSL behind proxy

Hi Fabrice
> Two things you should try:
> (1) reproducing the problem with a test case. HttpCore has a number of
> test cases for non-blocking SSL and you could use those as a starting
> point.
> (2) reproducing the problem with I/O session event logging on. This
> should help find out whether I/O interests are set correctly (write
> events suspended by mistake). Logging is simply indispensable when
> troubleshooting concurrency issues.
>    
You could also try the "-Djavax.net.debug=all" system property, which 
may give you a hint if the cause is SSL specific

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: HttpCore NIO & SSL behind proxy

Posted by "Asankha C. Perera" <as...@apache.org>.
Hi Fabrice
> Two things you should try:
> (1) reproducing the problem with a test case. HttpCore has a number of
> test cases for non-blocking SSL and you could use those as a starting
> point.
> (2) reproducing the problem with I/O session event logging on. This
> should help find out whether I/O interests are set correctly (write
> events suspended by mistake). Logging is simply indispensable when
> troubleshooting concurrency issues.
>    
You could also try the "-Djavax.net.debug=all" system property, which 
may give you a hint if the cause is SSL specific

cheers
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2010-07-16 at 12:10 +0200, DELHOSTE Fabrice wrote:
> Hi Oleg,
> 
> You know I am testing the asynchttpclient (and I know that you don't have lot of time to support this one). FYI the feedback is pretty good on HTTP, I've tested with a lot of concurrent requests. It seems stable as far as I have tested.
> 

Glad to hear that.


> Now my problem is that I just put the SSLIOClientEventDispatch instead of the default HTTP one and when doing a small sequence of HTTP request, the first request is ok but the next one hangs...it never sends the second HTTP request.
> 
> That seems strange as that should be transparent once the connection is ok (that has nothing to do with my previous mail on proxy as it has the same behavior with or without).
> 

While this is certainly true the non-blocking SSL is enormously complex
and therefore is much more bugs- / error-prone.


> Actually, it seems to miss the setting of WRITE event to the session after getting the HttpRequest.
> When debugging or pausing (or forcing the write everytime) it works.
> 
> Could you please help as I'm really stuck at least to go more in tests with HTTPS on this one?
> 

Two things you should try:
(1) reproducing the problem with a test case. HttpCore has a number of
test cases for non-blocking SSL and you could use those as a starting
point.
(2) reproducing the problem with I/O session event logging on. This
should help find out whether I/O interests are set correctly (write
events suspended by mistake). Logging is simply indispensable when
troubleshooting concurrency issues.     

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Hi Oleg,

You know I am testing the asynchttpclient (and I know that you don't have lot of time to support this one). FYI the feedback is pretty good on HTTP, I've tested with a lot of concurrent requests. It seems stable as far as I have tested.

Now my problem is that I just put the SSLIOClientEventDispatch instead of the default HTTP one and when doing a small sequence of HTTP request, the first request is ok but the next one hangs...it never sends the second HTTP request.

That seems strange as that should be transparent once the connection is ok (that has nothing to do with my previous mail on proxy as it has the same behavior with or without).

Actually, it seems to miss the setting of WRITE event to the session after getting the HttpRequest.
When debugging or pausing (or forcing the write everytime) it works.

Could you please help as I'm really stuck at least to go more in tests with HTTPS on this one?

BR,
Fabrice

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: mercredi 7 juillet 2010 14:40
To: HttpComponents Project
Subject: RE: HttpCore NIO & SSL behind proxy

On Wed, 2010-07-07 at 14:15 +0200, DELHOSTE Fabrice wrote:
> Thanks, that helps a lot.
> That is actually close to what I'm planning to do...
> 
> However, do you think I can do all this by directly subclassing SSLClientIOEventDispatch?
> In other words, adding the CONNECT request to the newly created connection first, overriding/wrapping SSLClientIOEventDispatch.createConnection (but how do I get synchronously the result by submitting a request to that connection)?
> And let the SSL dispatcher do the SSL job after?

My personal recommendation would be to keep the i/o dispatcher protocol
agnostic and move all protocol specific logic including HTTP CONNECT
code to a custom protocol handler. Having said that, it should also be
possible to achieve the same result by subclassing the
SSLClientIOEventDispatch class.

Cheers

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2010-07-07 at 14:15 +0200, DELHOSTE Fabrice wrote:
> Thanks, that helps a lot.
> That is actually close to what I'm planning to do...
> 
> However, do you think I can do all this by directly subclassing SSLClientIOEventDispatch?
> In other words, adding the CONNECT request to the newly created connection first, overriding/wrapping SSLClientIOEventDispatch.createConnection (but how do I get synchronously the result by submitting a request to that connection)?
> And let the SSL dispatcher do the SSL job after?

My personal recommendation would be to keep the i/o dispatcher protocol
agnostic and move all protocol specific logic including HTTP CONNECT
code to a custom protocol handler. Having said that, it should also be
possible to achieve the same result by subclassing the
SSLClientIOEventDispatch class.

Cheers

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Thanks, that helps a lot.
That is actually close to what I'm planning to do...

However, do you think I can do all this by directly subclassing SSLClientIOEventDispatch?
In other words, adding the CONNECT request to the newly created connection first, overriding/wrapping SSLClientIOEventDispatch.createConnection (but how do I get synchronously the result by submitting a request to that connection)?
And let the SSL dispatcher do the SSL job after?

I already made some slight changes (composite HTTP+HTTPS dispatcher, callback enhancement, backport to 4.0.1) and tested httpasyncclient. I'll push changes when/if my updates have the right level of quality regarding my network-related background (or just as a small contrib with warning :-).

Cheers,
Fabrice

-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: mercredi 7 juillet 2010 12:31
To: HttpComponents Project
Subject: RE: HttpCore NIO & SSL behind proxy

On Wed, 2010-07-07 at 01:35 +0200, DELHOSTE Fabrice wrote:
> Yes I'm aware of that - not my first time in this list and on this topic.

Right. I forgot. 

> HTTP gateway pattern (latency, external backend, lot of users, etc) and more, which makes NIO very relevant.
> We were already using Httpclient and now httpcore nio (async client slightly updated from yours) but I need SSL/proxy support...

Adding support for the SSL tunneling most likely takes the following:
(1) check whether the current request requires SSL tunneling (SSL +
proxy mode)
(2) if so, execute HTTP CONNECT to request a tunnel to the target server
(3) if the proxy responds with 200 status code, a tunnel to the target
server has been established
(4) initialize SSL context as required and decorate the existing
IOSession with SSLIOSession using that SSL context
(5) stick the SSLIOSession instance to the original IOSession as an
attribute. 
(6) (this is the tricky bit) the I/O dispatcher needs to be made aware
of that fact that the i/o session has been upgraded to use SSL
encryption. Most probably the dispatcher should check for the SSL
session attribute, and if present, it should use extended methods of the
SSLIOSession instance to ensure proper encryption / decryption of
transported data. So, most certainly you will need a custom
IOEventDispatch implementation.

Hope this helps.

Please also consider contributing some of your changes to the
AsyncHttpClient back to the project.

Cheers

Oleg

> ________________________________________
> From: Oleg Kalnichevski [olegk@apache.org]
> Sent: Wednesday, July 07, 2010 00:26
> To: HttpComponents Project
> Subject: Re: HttpCore NIO & SSL behind proxy
> 
> On Tue, 2010-07-06 at 23:28 +0200, DELHOSTE Fabrice wrote:
> > Thx.
> >
> > I actually know a bit about the async client tryout. Btw I've also looked to Netty (any perf idea?) and used Mina in the past years...
> >
> > Even if it's helpful to understand what could be this high level package (pool, ...), I'd like to know more how I could implement/reuse some components for http core nio client to go first through a simple Http/s proxy (no authent, no chain, ...).
> >
> > Http Client supports this in a great seamless approach. Could you please point me into the right direction if any of this makes sense to reuse for http core nio (i've seen old discussion in the mailing list but no sample or details so far) ?
> >
> > Fabrice
> 
> Fabrice
> 
> What is the reason you want to be using NIO for client-side HTTP in the
> first place? In my experience there is simply no real benefit of using
> NIO over classic I/O for HTTP clients. NIO is slower and massively more
> complex. It is just not worth it (unless used to manage outgoing
> connections inside an HTTP proxy or an HTTP gateway).
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2010-07-07 at 01:35 +0200, DELHOSTE Fabrice wrote:
> Yes I'm aware of that - not my first time in this list and on this topic.

Right. I forgot. 

> HTTP gateway pattern (latency, external backend, lot of users, etc) and more, which makes NIO very relevant.
> We were already using Httpclient and now httpcore nio (async client slightly updated from yours) but I need SSL/proxy support...

Adding support for the SSL tunneling most likely takes the following:
(1) check whether the current request requires SSL tunneling (SSL +
proxy mode)
(2) if so, execute HTTP CONNECT to request a tunnel to the target server
(3) if the proxy responds with 200 status code, a tunnel to the target
server has been established
(4) initialize SSL context as required and decorate the existing
IOSession with SSLIOSession using that SSL context
(5) stick the SSLIOSession instance to the original IOSession as an
attribute. 
(6) (this is the tricky bit) the I/O dispatcher needs to be made aware
of that fact that the i/o session has been upgraded to use SSL
encryption. Most probably the dispatcher should check for the SSL
session attribute, and if present, it should use extended methods of the
SSLIOSession instance to ensure proper encryption / decryption of
transported data. So, most certainly you will need a custom
IOEventDispatch implementation.

Hope this helps.

Please also consider contributing some of your changes to the
AsyncHttpClient back to the project.

Cheers

Oleg

> ________________________________________
> From: Oleg Kalnichevski [olegk@apache.org]
> Sent: Wednesday, July 07, 2010 00:26
> To: HttpComponents Project
> Subject: Re: HttpCore NIO & SSL behind proxy
> 
> On Tue, 2010-07-06 at 23:28 +0200, DELHOSTE Fabrice wrote:
> > Thx.
> >
> > I actually know a bit about the async client tryout. Btw I've also looked to Netty (any perf idea?) and used Mina in the past years...
> >
> > Even if it's helpful to understand what could be this high level package (pool, ...), I'd like to know more how I could implement/reuse some components for http core nio client to go first through a simple Http/s proxy (no authent, no chain, ...).
> >
> > Http Client supports this in a great seamless approach. Could you please point me into the right direction if any of this makes sense to reuse for http core nio (i've seen old discussion in the mailing list but no sample or details so far) ?
> >
> > Fabrice
> 
> Fabrice
> 
> What is the reason you want to be using NIO for client-side HTTP in the
> first place? In my experience there is simply no real benefit of using
> NIO over classic I/O for HTTP clients. NIO is slower and massively more
> complex. It is just not worth it (unless used to manage outgoing
> connections inside an HTTP proxy or an HTTP gateway).
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


RE: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Yes I'm aware of that - not my first time in this list and on this topic.
HTTP gateway pattern (latency, external backend, lot of users, etc) and more, which makes NIO very relevant.
We were already using Httpclient and now httpcore nio (async client slightly updated from yours) but I need SSL/proxy support...
________________________________________
From: Oleg Kalnichevski [olegk@apache.org]
Sent: Wednesday, July 07, 2010 00:26
To: HttpComponents Project
Subject: Re: HttpCore NIO & SSL behind proxy

On Tue, 2010-07-06 at 23:28 +0200, DELHOSTE Fabrice wrote:
> Thx.
>
> I actually know a bit about the async client tryout. Btw I've also looked to Netty (any perf idea?) and used Mina in the past years...
>
> Even if it's helpful to understand what could be this high level package (pool, ...), I'd like to know more how I could implement/reuse some components for http core nio client to go first through a simple Http/s proxy (no authent, no chain, ...).
>
> Http Client supports this in a great seamless approach. Could you please point me into the right direction if any of this makes sense to reuse for http core nio (i've seen old discussion in the mailing list but no sample or details so far) ?
>
> Fabrice

Fabrice

What is the reason you want to be using NIO for client-side HTTP in the
first place? In my experience there is simply no real benefit of using
NIO over classic I/O for HTTP clients. NIO is slower and massively more
complex. It is just not worth it (unless used to manage outgoing
connections inside an HTTP proxy or an HTTP gateway).

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2010-07-06 at 23:28 +0200, DELHOSTE Fabrice wrote:
> Thx.
> 
> I actually know a bit about the async client tryout. Btw I've also looked to Netty (any perf idea?) and used Mina in the past years...
> 
> Even if it's helpful to understand what could be this high level package (pool, ...), I'd like to know more how I could implement/reuse some components for http core nio client to go first through a simple Http/s proxy (no authent, no chain, ...).
> 
> Http Client supports this in a great seamless approach. Could you please point me into the right direction if any of this makes sense to reuse for http core nio (i've seen old discussion in the mailing list but no sample or details so far) ?
> 
> Fabrice

Fabrice

What is the reason you want to be using NIO for client-side HTTP in the
first place? In my experience there is simply no real benefit of using
NIO over classic I/O for HTTP clients. NIO is slower and massively more
complex. It is just not worth it (unless used to manage outgoing
connections inside an HTTP proxy or an HTTP gateway). 

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Re: HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Thx.

I actually know a bit about the async client tryout. Btw I've also looked to Netty (any perf idea?) and used Mina in the past years...

Even if it's helpful to understand what could be this high level package (pool, ...), I'd like to know more how I could implement/reuse some components for http core nio client to go first through a simple Http/s proxy (no authent, no chain, ...).

Http Client supports this in a great seamless approach. Could you please point me into the right direction if any of this makes sense to reuse for http core nio (i've seen old discussion in the mailing list but no sample or details so far) ?

Fabrice

Le 6 juil. 2010 à 21:06, Oleg Kalnichevski <ol...@apache.org> a écrit :

> On Tue, 2010-07-06 at 16:37 +0200, DELHOSTE Fabrice wrote:
>> Hi,
>> 
>> I'd like to know if there's a sample on how to use HttpCore NIO with SSL through a proxy. The SSL part is ok without proxy but I haven't found any relevant example through proxy.
>> 
>> Should I look to HttpClient to look what to do in HttpCore NIO?
>> Is there some utility classes to manage that?
>> 
>> Cheers,
>> Fabrice
>> 
> 
> Fabrice
> 
> HttpCore provides only the most fundamental HTTP transport functions.
> Support for HTTP proxies is out of the project's scope.
> 
> There is an experimental asynchronous HTTP client based on HttpCore NIO
> but it is still at the pre-ALPHA stage of development and currently also
> does not have proxy support.
> 
> http://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk/
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
> 

Re: HttpCore NIO & SSL behind proxy

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2010-07-06 at 16:37 +0200, DELHOSTE Fabrice wrote:
> Hi,
> 
> I'd like to know if there's a sample on how to use HttpCore NIO with SSL through a proxy. The SSL part is ok without proxy but I haven't found any relevant example through proxy.
> 
> Should I look to HttpClient to look what to do in HttpCore NIO?
> Is there some utility classes to manage that?
> 
> Cheers,
> Fabrice
> 

Fabrice

HttpCore provides only the most fundamental HTTP transport functions.
Support for HTTP proxies is out of the project's scope.

There is an experimental asynchronous HTTP client based on HttpCore NIO
but it is still at the pre-ALPHA stage of development and currently also
does not have proxy support.

http://svn.apache.org/repos/asf/httpcomponents/httpasyncclient/trunk/

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


HttpCore NIO & SSL behind proxy

Posted by DELHOSTE Fabrice <Fa...@gemalto.com>.
Hi,

I'd like to know if there's a sample on how to use HttpCore NIO with SSL through a proxy. The SSL part is ok without proxy but I haven't found any relevant example through proxy.

Should I look to HttpClient to look what to do in HttpCore NIO?
Is there some utility classes to manage that?

Cheers,
Fabrice


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[jira] Resolved: (HTTPCLIENT-966) Kerberos : KRBError sname include port.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-966.
------------------------------------------

    Resolution: Invalid

Julien

Different servers seem to have different expectations in this regard. You can configure NegotiateScheme to strip away the port off the service name by passing false as the 'stipPort' parameter to NegotiateSchemeFactory.

Oleg

> Kerberos : KRBError sname include port.
> ---------------------------------------
>
>                 Key: HTTPCLIENT-966
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-966
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1 Alpha2
>         Environment: Windows XP SP2
>            Reporter: Julien
>
> When trying to contact "http://myhost.mydomain:myport/myApp/"
> Kerberos TGS-REQ sname is "myhost.mydomain:myport" (captured with wireshark) and there are KrbException: Server not found in Kerberos database (7) in my program.
> When trying to open "http://myhost.mydomain:myport/myApp/" in firefox
> Kerberos TGS-REQ sname is "myhost.mydomain" and it's work.
> i think it's a bug, cause sname have not to contain ":myport"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org