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

Josh Deanor edited comment on CAMEL-4489 at 9/27/11 4:12 PM:
-------------------------------------------------------------

I tried with the patch, it does not work. I did something to make it work, but 
I'll leave it to you to figure out what the issue is.

I see the changes you've made, but that doesn't change what is returned here:

In HttpPollingConsumer.java:

{code|borderStyle=solid}

 protected HttpRequestBase createMethod() 
 {
        String uri = endpoint.getEndpointUri();
        return new HttpGet(uri);
    }

{code}

I had a debug point here on String uri=endpoint.getEndpointUri(); and I noticed 
that it pointed to 'http4://www.google.com' and to make it work, I changed the 
uri to "http://www.google.com"; (during debug) and it returned the correct 
response (HTTP 200). 


                
      was (Author: fedexp):
    I tried with the patch, it does not work. I did something to make it work, 
but I'll leave it to you to figure out what the issue is.

I see the changes you've made, but that doesn't change what is returned here:

In HttpPollingConsumer.java:

{code:java|borderStyle=solid}

 protected HttpRequestBase createMethod() 
 {
        String uri = endpoint.getEndpointUri();
        return new HttpGet(uri);
    }

{code:java}

I had a debug point here on String uri=endpoint.getEndpointUri(); and I noticed 
that it pointed to 'http4://www.google.com' and to make it work, I changed the 
uri to "http://www.google.com"; (during debug) and it returned the correct 
response (HTTP 200). 


                  
> camel-http4 sends out a 'http4' GET request
> -------------------------------------------
>
>                 Key: CAMEL-4489
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4489
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http
>         Environment: Windows XP, JDK 1.6
>            Reporter: Josh Deanor
>            Assignee: Willem Jiang
>            Priority: Critical
>              Labels: http, http4
>             Fix For: 2.7.4, 2.8.2, 2.9.0
>
>
> When I try to do : from("http4://www.google.com/").to("mock:results") using 
> apache camel-http4 scheme, a GET request is being sent out with 'http4' as 
> the protocol - my proxy server fails to understand this as a protocol. 
> This is what the log looks like: 
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (RequestAddCookies.java132) - CookieSpec selected: best-match
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (RequestAuthCache.java75) - Auth cache not set in the context
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (DefaultRequestDirector.java643) - Attempt 1 to execute request
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (DefaultClientConnection.java264) - Sending request: GET 
> http4://www.google.com/ HTTP/1.1
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] (Wire.java63) - 
> >> "GET http4://www.google.com/ HTTP/1.1[\r][\n]"
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] (Wire.java63) - 
> >> "Host: www.google.com[\r][\n]"
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] (Wire.java63) - 
> >> "Proxy-Connection: Keep-Alive[\r][\n]"
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] (Wire.java63) - 
> >> "[\r][\n]"
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (DefaultClientConnection.java268) - >> GET http4://www.google.com/ HTTP/1.1
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (DefaultClientConnection.java271) - >> Host: www.google.com
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] 
> (DefaultClientConnection.java271) - >> Proxy-Connection: Keep-Alive
>   DEBUG [Camel (camel-1) thread #0 - http4://www.google.com/] (Wire.java63) - 
> << "HTTP/1.1 502 Proxy Error 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to