[jira] [Commented] (HTTPCLIENT-900) Don't enforce URI syntax

2012-12-21 Thread Oleg Kalnichevski (JIRA)

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

Oleg Kalnichevski commented on HTTPCLIENT-900:
--

Noah,
Yes, 4.3 API is still being developed and is unstable. However, id you start 
using it early you can still influence the way it evolves.

The trouble with BasicHttpRequest is that it is provided by the core module 
whereas the HttpExecutionAware interface is client specific.

Oleg

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>  Components: HttpClient
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>Priority: Minor
> Fix For: 4.3 Alpha1
>
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

--
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-900) Don't enforce URI syntax

2012-12-20 Thread Noah Levitt (JIRA)

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

Noah Levitt commented on HTTPCLIENT-900:


This is fantastic Oleg, thank you!!

Seems like API is still in flux, so we should wait a bit before programming to 
the new API. One thing I'm wondering about is if BasicHttpRequest will 
implement HttpExecutionAware. It would be easy enough for us to extend the 
BasicHttpRequest and add that functionality, but it also looks like it would be 
simple to pull it up into a new abstract class e.g. AbortableHttpRequestBase 
that BasicHttpRequest and HttpRequestBase could both extend. Just a thought, 
and I haven't looked at this in depth yet.

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>  Components: HttpClient
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>Priority: Minor
> Fix For: 4.3 Alpha1
>
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

--
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-900) Don't enforce URI syntax

2012-10-02 Thread Oleg Kalnichevski (JIRA)

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

Oleg Kalnichevski commented on HTTPCLIENT-900:
--

Noah
This is not a very simple change if it is to happen without breaking API 
compatibility. We would need to deprecate HttpUriRequest, HttpClient, 
RedirectStrategy and each and every class that touches any of those interfaces. 
This is doable but requires a lot of efforts. 

Probably, a more practical (or intermediate if you like it better) solution 
would be changing the underlying implementation of the following method and 
preserving the original request URI without trying to rewrite it.
---
HttpResponse execute(HttpHost target, HttpRequest request,
 HttpContext context)
throws IOException, ClientProtocolException;
---
This would enable the client to send whatever garbage the server is prepared to 
accept as a valid request URI at the price of having a few web servers choke on 
requests containing absolute request URIs.

Oleg   

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>  Components: HttpClient
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>Priority: Minor
> Fix For: Future
>
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

--
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-900) Don't enforce URI syntax

2012-10-01 Thread Noah Levitt (JIRA)

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

Noah Levitt commented on HTTPCLIENT-900:


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939847
"technically-illegal-but-usually-functional URIs appear all over... any 
moderately sized crawl of the web will encounter hundreds of such URIs. Other 
dominant net software, such as web browsers, already tolerate such URIs. So to 
match commonly expected behavior, and support real-world net applications"... 
can't use java.net.URI.

The use of java.net.URI is preventing heritrix, the open source web crawler, 
from moving to httpclient. Using httpcore-only is an interesting idea that I 
will look into. But I already have code for heritrix to use httpclient so I'd 
like to prepare a patch for this issue.

> HttpClient 3.x codeline has its own URI implementation, which has been the 
> single largest source of issues/ bugs. I am, for one, very reluctant to 
> repeat the same mistake.

To address this, org.apache.http.URI could simply wrap a java.net.URI, carrying 
along its validation. The key difference would be that it not be final, so 
users of the library such as heritrix could override that implementation.

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>  Components: HttpClient
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>Priority: Minor
> Fix For: Future
>
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

--
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-900) Don't enforce URI syntax

2009-12-11 Thread Oleg Kalnichevski (JIRA)

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

Oleg Kalnichevski commented on HTTPCLIENT-900:
--

HttpClient 3.x codeline has its own URI implementation, which has been the 
single largest source of issues/ bugs. I am, for one, very reluctant to repeat 
the same mistake.

Oleg

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>  Components: HttpClient
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>Priority: Minor
> Fix For: Future
>
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

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



[jira] Commented: (HTTPCLIENT-900) Don't enforce URI syntax

2009-12-11 Thread Marko Asplund (JIRA)

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

Marko Asplund commented on HTTPCLIENT-900:
--

Note that the URI RFC 2396 classifies '{' and '}' characters as "unwise" 
characters that should be escaped but a later version of the RFC (3986) removes 
this restriction. The URL RFC 1738, however, classifies these characters as 
"unsafe" and specifies that they should be escaped.

Since HC Client actually deals with URLs, it might be a good idea to change the 
URL's internal representation that HC Client uses from java.net.URI to 
java.net.URL. Java 6 doesn't have similar syntax restrictions for URL 
instances, currently. For backwards compatibility, the current HttpGet(URI) and 
HttpGet(String) constructors could continue to work as previously and still use 
URI but behind the scenes but the internal representation could be converted to 
URL. Additionally a new constructor HttpGet(URL) could be added.

Another option could be to have HC Client implement it's own URL/URI class. The 
simplest way would be to use the implementation from Harmony since the projects 
use the same license. This class could be made subclassable so that removing 
possible syntax restrictions could be left to the HC Client user (the user 
could pass HttpGet et al. an URI subclass that could skip certain types of 
syntax checking).

> Don't enforce URI syntax
> 
>
> Key: HTTPCLIENT-900
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-900
> Project: HttpComponents HttpClient
>  Issue Type: Improvement
>Affects Versions: 4.0 Final
>Reporter: Marko Asplund
>
> I'm trying to use HttpComponents Client for fetching data from a web site.
> I've ran into problems that seem to be related with the way the request URL 
> query parameters are handled on the server side.
> The service doesn't encode unsafe characters (e.g. '{' and '}') in response 
> URLs.
> Also when these characters are encoded on the client prior to issuing the 
> request the service gives incorrect responses.
> The URLs are of the following form:
> http://www.foo.bar/foobar?${APPL}=hetekaue
> On the otherhand HC Client doesn't allow me to send requests with invalid 
> query syntax
> (HttpGet(String) constructor throws an URISyntaxException).
> It would be good if HC Client could be used also in situations like this.

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