Replies: 6 comments 7 replies
-
I'm not convinced that automatic encoding of slashes in path segments always should be done by libraries. How does the affect RabbitMQ users? |
Beta Was this translation helpful? Give feedback.
-
Using the RabbitMQ AWS library, I would like to make a request to a path that has forward slashes. How can this be done otherwise? |
Beta Was this translation helpful? Give feedback.
-
@jovilark encode them as path segments in your own code. IIRC path segments of URIs are percent-encoded (but different URI components are encoded differently). |
Beta Was this translation helpful? Give feedback.
-
@michaelklishin Do you mind showing an example ? Neither work |
Beta Was this translation helpful? Give feedback.
-
In general, if a library accepts a URI path, you can be sure that you are responsible for the escaping part. The library cannot possibly know what should be escaped and what should not. Libraries that would like to provide automatic escaping have no choice but to accept path segments as a list, which is less convenient in its own way. |
Beta Was this translation helpful? Give feedback.
-
I still am having trouble understanding the solution to the issue I am having, or implementing what you are saying. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi RabbitMQ,
When creating a request, including a forward slash character in the path, service or region results in the rest of the URI being snipped early.
examples:
set_region("us-west-2")
rabbitmq_aws:get("lambda", "/2015-03-31/functions/FunctionName"),
URI constructed in request:
expected: lambda.us-west-2.amazonaws.com/2015-03-31/functions/FunctionName
actual: lambda.us-west-2.amazonaws.com/2015-03-31
set_region("us-west-2")
rabbitmq_aws:get("lam/bda", "/2015-03-31/functions/FunctionName"),
URI constructed in request:
expected: lam/bda.us-west-2.amazonaws.com/2015-03-31/functions/FunctionName
actual: lam
set_region("us-west/-2"),
rabbitmq_aws:get("lambda", "/2015-03-31/functions/FunctionName"),
URI constructed in request:
expected: lam/bda.us-west-2.amazonaws.com/2015-03-31/functions/FunctionName
actual: lambda.us-west
I haven't been able to identify exactly where this truncation occurs with my unfamiliarity with Erlang, I apologise.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions