brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svetoslav Neykov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BROOKLYN-437) Deprecate Url.{encode,decode} and other uses of URLEncoder
Date Tue, 14 Feb 2017 16:10:42 GMT

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

Svetoslav Neykov updated BROOKLYN-437:
--------------------------------------
    Description: 
{{URLEncoder}} is used for encoding the data in the body of a POST request. While close to
the encoding of parameters in the URL query part it's not the same. It's used for encoding
other parts of the URL as well like the username/password pair or path elements. While this
works fine in testing scenarios and straightforward usage it will fail in some edge cases,
leading to hard to troubleshoot intermittent errors.

I suggest we replace it with a URL builder instead where it's possible to express which part
of the URL needs escaping.
One possible option is https://github.com/mikaelhg/urlbuilder. It's standalone with minimal
dependencies. Suggest going through the test coverage before deciding on it though.
There are other alternative implementations, usually bundles with jax-rs implementations which
makes them much more heavy. Could already have one coming from CXF - needs checking.

See https://github.com/apache/brooklyn-server/pull/551 for discussion details.

  was:
{{URLEncoder}} is used for encoding the data in the body of a POST request. While close to
the encoding of parameters in the URL query part it's not the same. It's used for encoding
other parts of the URL as well like the username/password pair or path elements. While this
works fine in testing scenarios and straightforward usage it will fail in some edge cases,
leading to hard to troubleshoot intermittent errors.

I suggest we replace it with a URL builder instead where it's possible to express which part
of the URL needs escaping.
One possible option is https://github.com/mikaelhg/urlbuilder. It's standalone with minimal
dependencies. Suggest going through the test coverage before deciding on it though.
There are other alternative implementations, usually bundles with jax-rs implementations which
makes them much more heavy. Could already have one coming from CXF - needs checking.


> Deprecate Url.{encode,decode} and other uses of URLEncoder
> ----------------------------------------------------------
>
>                 Key: BROOKLYN-437
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-437
>             Project: Brooklyn
>          Issue Type: Improvement
>            Reporter: Svetoslav Neykov
>
> {{URLEncoder}} is used for encoding the data in the body of a POST request. While close
to the encoding of parameters in the URL query part it's not the same. It's used for encoding
other parts of the URL as well like the username/password pair or path elements. While this
works fine in testing scenarios and straightforward usage it will fail in some edge cases,
leading to hard to troubleshoot intermittent errors.
> I suggest we replace it with a URL builder instead where it's possible to express which
part of the URL needs escaping.
> One possible option is https://github.com/mikaelhg/urlbuilder. It's standalone with minimal
dependencies. Suggest going through the test coverage before deciding on it though.
> There are other alternative implementations, usually bundles with jax-rs implementations
which makes them much more heavy. Could already have one coming from CXF - needs checking.
> See https://github.com/apache/brooklyn-server/pull/551 for discussion details.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message