Results 1 to 3 of 3

Thread: http uri-variable escaping '?'

  1. #1
    Join Date
    Oct 2004
    Location
    Berwyn, PA
    Posts
    56

    Default http uri-variable escaping '?'

    Test Using the latest 2.2.0.BUILD-SNAPSHOT (also in RC2)

    Code:
     <int-http:outbound-gateway url="{url}" request-channel="inputChannel" http-method="GET" expected-response-type="java.lang.String" 
       	reply-channel="outputChannel">
           <int-http:uri-variable name="url" expression="'http://www.google.com/finance/info?q='+ payload"/>
        </int-http:outbound-gateway>
        
        <int:channel id="outputChannel">
        	<int:queue/>
        </int:channel>
    RestTemplate: GET request for "http://www.google.com/finance/info%3Fq=VMW" resulted in 404 (Not Found); invoking error handler.

    This worked fine in 2.1.3.RELEASE (no escaping '?'). Fails with 2.1.4.RELEASE. Is this a bug? Is there a workaround?
    David Turanski
    SpringSource Senior Software Engineer

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,017

    Default

    Were you using Spring 3.0 with 2.1.3 and 3.1 with the others (including 2.1.4)??

    I recall there was a change in Spring 3.1's RestTemplate, but I am having trouble locating the forum post(s).

    The work-around (IIRC) is to use {firstPart}?{secondPart} with 2 <uri-variable/>s.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,017

    Default

    Found the JIRA - it was closed as won't fix...

    https://jira.springsource.org/browse/INT-2569
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •