[jira] [Commented] (HTTPCLIENT-1282) When using Virtual host, there is no way to use the default port

2012-12-19 Thread Nicolas Richeton (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13536123#comment-13536123
 ] 

Nicolas Richeton commented on HTTPCLIENT-1282:
--

I made a quick check : we already construct requests URI with the virtual host, 
but this information is not used by HttpClient for cookie validation at least 
on 4.2.2. 

At the API level, I think you are right URI and target host are enough for our 
usecase.
At the behavior level, we still have an issue : Only target host is used for 
cookie validation, and not the URI or any additional Host headers.

Should we move this discussion to another bug ? 

Nicolas

> When using Virtual host, there is no way to use the default port
> 
>
> Key: HTTPCLIENT-1282
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1282
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>  Components: HttpClient
>Affects Versions: 4.2.2, 4.2.3
>Reporter: Nicolas Richeton
>
> The following change automatically adds a port to the provided virtual host : 
> https://issues.apache.org/jira/browse/HTTPCLIENT-1092
> This is an issue, because you can no longer use a virtual host with default 
> port, but web applications often fixes urls by redirecting to the canonical 
> url (which does not include port). It makes impossible to reach page content 
> as we are getting only redirects.
> This would need to revert this update.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (HTTPCLIENT-1282) When using Virtual host, there is no way to use the default port

2012-12-19 Thread Oleg Kalnichevski (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13536079#comment-13536079
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1282:
---

May I ask you something? Why do not you simply construct requests with the 
virtual host in the request URI?

Oleg

> When using Virtual host, there is no way to use the default port
> 
>
> Key: HTTPCLIENT-1282
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1282
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>  Components: HttpClient
>Affects Versions: 4.2.2, 4.2.3
>Reporter: Nicolas Richeton
>
> The following change automatically adds a port to the provided virtual host : 
> https://issues.apache.org/jira/browse/HTTPCLIENT-1092
> This is an issue, because you can no longer use a virtual host with default 
> port, but web applications often fixes urls by redirecting to the canonical 
> url (which does not include port). It makes impossible to reach page content 
> as we are getting only redirects.
> This would need to revert this update.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (HTTPCLIENT-1282) When using Virtual host, there is no way to use the default port

2012-12-19 Thread Nicolas Richeton (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535885#comment-13535885
 ] 

Nicolas Richeton commented on HTTPCLIENT-1282:
--

On HTTPCLIENT-1092, it seems like a convention for creating HttpHost more 
easily, but in the other side this convention does not work for all use cases. 

Basically, our usecase is a reverse proxy : we have a single target host 
defined (localhost or a remote IP), we receive requests and forward the Host 
header included in requests to requests made using HttpClient. 

If virtual host parameter is removed, we could add a Host header directly (we 
were doing this before) BUT this interact with cookie management as HttpClient 
only uses target host and virtual host parameter to validate cookie domain and 
not the Host header. As a result cookies get discarded because domains don't 
match. 

In that case, maybe we could let the existing code untouched in 4.2.X (and not 
use it until it disappears) and fix cookie validation using the Host parameter ?

Nicolas



> When using Virtual host, there is no way to use the default port
> 
>
> Key: HTTPCLIENT-1282
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1282
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>  Components: HttpClient
>Affects Versions: 4.2.2, 4.2.3
>Reporter: Nicolas Richeton
>
> The following change automatically adds a port to the provided virtual host : 
> https://issues.apache.org/jira/browse/HTTPCLIENT-1092
> This is an issue, because you can no longer use a virtual host with default 
> port, but web applications often fixes urls by redirecting to the canonical 
> url (which does not include port). It makes impossible to reach page content 
> as we are getting only redirects.
> This would need to revert this update.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (HTTPCLIENT-1282) When using Virtual host, there is no way to use the default port

2012-12-19 Thread Oleg Kalnichevski (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535849#comment-13535849
 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1282:
---

I just cannot make everyone happy, can I? 

I have to admit I do not know the motivation behind HTTPCLIENT-1092 and I do 
not want to revert it without Sebastian's explicit consent.

Please note, though, the virtual host parameter will be deprecated in 4.3. It 
should have never existed in the first place. Please consider using the virtual 
host in the URI of the request message.

Oleg

> When using Virtual host, there is no way to use the default port
> 
>
> Key: HTTPCLIENT-1282
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1282
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>  Components: HttpClient
>Affects Versions: 4.2.2, 4.2.3
>Reporter: Nicolas Richeton
>
> The following change automatically adds a port to the provided virtual host : 
> https://issues.apache.org/jira/browse/HTTPCLIENT-1092
> This is an issue, because you can no longer use a virtual host with default 
> port, but web applications often fixes urls by redirecting to the canonical 
> url (which does not include port). It makes impossible to reach page content 
> as we are getting only redirects.
> This would need to revert this update.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (HTTPCLIENT-1282) When using Virtual host, there is no way to use the default port

2012-12-18 Thread Nicolas Richeton (JIRA)

[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13535396#comment-13535396
 ] 

Nicolas Richeton commented on HTTPCLIENT-1282:
--

Code is in org.apache.http.impl.client.DefaultRequestDirector#execute()

// HTTPCLIENT-1092 - add the port if necessary
   if (virtualHost != null && virtualHost.getPort() == -1) {
int port = target.getPort();
if (port != -1){
virtualHost = new HttpHost(virtualHost.getHostName(), port, 
virtualHost.getSchemeName());
}
   }

> When using Virtual host, there is no way to use the default port
> 
>
> Key: HTTPCLIENT-1282
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1282
> Project: HttpComponents HttpClient
>  Issue Type: Bug
>  Components: HttpClient
>Affects Versions: 4.2.2, 4.2.3
>Reporter: Nicolas Richeton
>
> The following change automatically adds a port to the provided virtual host : 
> https://issues.apache.org/jira/browse/HTTPCLIENT-1092
> This is an issue, because you can no longer use a virtual host with default 
> port, but web applications often fixes urls by redirecting to the canonical 
> url (which does not include port). It makes impossible to reach page content 
> as we are getting only redirects.
> This would need to revert this update.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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