JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Restlet Transport
  • RESTLET-10

UriTemplateFilter does not URL decode values set by set-payload and set-property

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: To be reviewed To be reviewed
  • Resolution: Unresolved
  • Affects Version/s: 1.2
  • Fix Version/s: None
  • Component/s: Core
  • Labels:
    None
  • User impact:
    Medium
  • Configuration:
    Hide

    <?xml version="1.0" encoding="UTF-8"?>
    <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:http="http://www.mulesource.org/schema/mule/http/2.2"
    xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
    xmlns:restlet="http://www.mulesource.org/schema/mule/restlet/2.2"
    xsi:schemaLocation="
    http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
    http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd
    http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
    http://www.mulesource.org/schema/mule/restlet/2.2 http://www.mulesource.org/schema/mule/restlet/2.2/mule-restlet.xsd">

    <model>

    <service name="RestEcho">
    <inbound>
    <http:inbound-endpoint host="localhost" port="14444" synchronous="true" keep-alive="true" />
    </inbound>
    <outbound>
    <filtering-router>
    <vm:outbound-endpoint path="echo" synchronous="true" />
    <restlet:uri-template-filter pattern="/echo/{set-payload.foob}" />
    </filtering-router>
    <filtering-router>
    <vm:outbound-endpoint path="echo" synchronous="true" />
    <restlet:uri-template-filter pattern="/echo?message={set-payload.foob}" />
    </filtering-router>
    </outbound>
    </service>

    <service name="Echo">
    <inbound>
    <vm:inbound-endpoint path="echo" synchronous="true" />
    </inbound>
    <log-component />
    </service>

    </model>

    </mule>

    Show
    <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesource.org/schema/mule/core/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://www.mulesource.org/schema/mule/http/2.2" xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2" xmlns:restlet="http://www.mulesource.org/schema/mule/restlet/2.2" xsi:schemaLocation=" http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/http/2.2 http://www.mulesource.org/schema/mule/http/2.2/mule-http.xsd http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd http://www.mulesource.org/schema/mule/restlet/2.2 http://www.mulesource.org/schema/mule/restlet/2.2/mule-restlet.xsd"> <model> <service name="RestEcho"> <inbound> <http:inbound-endpoint host="localhost" port="14444" synchronous="true" keep-alive="true" /> </inbound> <outbound> <filtering-router> <vm:outbound-endpoint path="echo" synchronous="true" /> <restlet:uri-template-filter pattern="/echo/{set-payload.foob}" /> </filtering-router> <filtering-router> <vm:outbound-endpoint path="echo" synchronous="true" /> <restlet:uri-template-filter pattern="/echo?message={set-payload.foob}" /> </filtering-router> </outbound> </service> <service name="Echo"> <inbound> <vm:inbound-endpoint path="echo" synchronous="true" /> </inbound> <log-component /> </service> </model> </mule>
  • Log Output:
    Hide
    03-05@10:51:00 DEBUG (DefaultMuleSession.java:351) - sending event to service: Echo event is: MuleEvent: a92a3fb3-287f-11df-9623-cdfa34c93a83, sync=true, stop processing=false, DefaultInboundEndpoint{endpointUri=vm://echo, connector=VMConnector{this=14a97f68, started=true, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[vm], serviceOverrides=null}, transformer=[], name='endpoint.vm.echo', properties={}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=true, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8}
    03-05@10:51:00 DEBUG (AbstractService.java:496) - Service: Echo has received synchronous event on: vm://echo
    03-05@10:51:00 DEBUG (SedaService.java:253) - SedaService{Echo} : got proxy for a92a3fb3-287f-11df-9623-cdfa34c93a83 = org.mule.component.DefaultJavaComponent component for: SedaService{Echo}
    03-05@10:51:00 INFO (LogComponent.java:41) -
    ********************************************************************************
    * Message received in service: Echo. Content is: '%25' *
    ********************************************************************************
    03-05@10:51:00 DEBUG (AbstractTransformer.java:248) - Applying transformer TransformerTemplate (org.mule.transformer.TransformerTemplate)
    03-05@10:51:00 DEBUG (AbstractTransformer.java:249) - Object before transform: org.mule.transport.DefaultMessageAdapter/org.mule.transport.DefaultMessageAdapter@6a46f764{id=a927cead-287f-11df-9623-cdfa34c93a83, payload=java.lang.String, properties=Properties{invocation:{}, inbou...
    03-05@10:51:00 DEBUG (AbstractTransformer.java:263) - Object after transform: %25
    Show
    03-05@10:51:00 DEBUG (DefaultMuleSession.java:351) - sending event to service: Echo event is: MuleEvent: a92a3fb3-287f-11df-9623-cdfa34c93a83, sync=true, stop processing=false, DefaultInboundEndpoint{endpointUri=vm://echo, connector=VMConnector{this=14a97f68, started=true, initialised=true, name='connector.VM.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[vm], serviceOverrides=null}, transformer=[], name='endpoint.vm.echo', properties={}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=true, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8} 03-05@10:51:00 DEBUG (AbstractService.java:496) - Service: Echo has received synchronous event on: vm://echo 03-05@10:51:00 DEBUG (SedaService.java:253) - SedaService{Echo} : got proxy for a92a3fb3-287f-11df-9623-cdfa34c93a83 = org.mule.component.DefaultJavaComponent component for: SedaService{Echo} 03-05@10:51:00 INFO (LogComponent.java:41) - ******************************************************************************** * Message received in service: Echo. Content is: '%25' * ******************************************************************************** 03-05@10:51:00 DEBUG (AbstractTransformer.java:248) - Applying transformer TransformerTemplate (org.mule.transformer.TransformerTemplate) 03-05@10:51:00 DEBUG (AbstractTransformer.java:249) - Object before transform: org.mule.transport.DefaultMessageAdapter/org.mule.transport.DefaultMessageAdapter@6a46f764{id=a927cead-287f-11df-9623-cdfa34c93a83, payload=java.lang.String, properties=Properties{invocation:{}, inbou... 03-05@10:51:00 DEBUG (AbstractTransformer.java:263) - Object after transform: %25
  • Similar Issues:
    None

Description

When URL escaped values are used as part of a URL matched by the UriTemplateFilter, the filter does not decode those values. In the example config posted, when http://localhost:14444/echo/%25 is passed in, the output is %25, not %. Although you could add a URL decoding transformer after the filter step to get the desired result for the payload, doing the same for properties would be more cumbersome. It seems like the filter should be handling this itself.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Builds
There are no comments yet on this issue.

People

  • Assignee:
    Dan Diephouse
    Reporter:
    Evan Deaubl
Vote (0)
Watch (1)

Dates

  • Created:
    05/Mar/10 12:00 PM
    Updated:
    05/Mar/10 12:00 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.