[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-commons-dev
Subject:    [jira] [Updated] (HTTPCLIENT-1796) java.lang.IllegalArgumentException thrown on a second # in url
From:       "Ahmad Mushtaq (JIRA)" <jira () apache ! org>
Date:       2016-12-21 15:18:58
Message-ID: JIRA.13029781.1482333396000.572370.1482333538325 () Atlassian ! JIRA
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Ahmad Mushtaq updated HTTPCLIENT-1796:
--------------------------------------
    Description: 
Here is the code to reproduce it:

    public static void main( String[] args ) throws Exception
    {

        String[] urls = {
                "http://www.google.com/index.html#test",
                "http://www.google.com/pr/ae?dsd=223#test",
                "http://www.google.com/pr/ae?dsd=223#test&p=2222#test"
        };

        final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
        CloseableHttpClient closableClient = httpClientBuilder
                .build();


        for (String url: urls) {
            final HttpUriRequest request = RequestBuilder
                    .create("GET")
                    .setUri(url)
                    .build();
            CloseableHttpResponse httpResponse = closableClient.execute(request);

        }

    }

// it should not throw an exception IMO, or please explain the rationale on throwing \
an exception. // since many js based apps now use such urls

  was:
Here is the code to reproduce it:

    public static void main( String[] args ) throws Exception
    {

        String[] urls = {
                "http://www.google.com/index.html#test",
                "http://www.google.com/pr/ae?dsd=223#test",
                "http://www.google.com/pr/ae?dsd=223#test&p=2222#test"
        };

        final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
        CloseableHttpClient closableClient = httpClientBuilder
                .build();


        for (String url: urls) {
            final HttpUriRequest request = RequestBuilder
                    .create("GET")
                    .setUri(url)
                    .build();
            CloseableHttpResponse httpResponse = closableClient.execute(request);

        }

    }

// 


> java.lang.IllegalArgumentException thrown on a second # in url
> --------------------------------------------------------------
> 
> Key: HTTPCLIENT-1796
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1796
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Reporter: Ahmad Mushtaq
> Priority: Minor
> 
> Here is the code to reproduce it:
> public static void main( String[] args ) throws Exception
> {
> String[] urls = {
> "http://www.google.com/index.html#test",
> "http://www.google.com/pr/ae?dsd=223#test",
> "http://www.google.com/pr/ae?dsd=223#test&p=2222#test"
> };
> final HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
> CloseableHttpClient closableClient = httpClientBuilder
> .build();
> for (String url: urls) {
> final HttpUriRequest request = RequestBuilder
> .create("GET")
> .setUri(url)
> .build();
> CloseableHttpResponse httpResponse = closableClient.execute(request);
> }
> }
> // it should not throw an exception IMO, or please explain the rationale on \
> throwing an exception. // since many js based apps now use such urls



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic