[
https://issues.apache.org/jira/browse/AXIS2C-1626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1626.
-------------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
When sending HTTP GET/HEAD/DELETE requests without SOAP parameters,
the query string from the original URL was being discarded. Only the
path component was used, losing any query parameters.
This fix checks if the URL already has a query string (via
axutil_url_get_query) and preserves it in the request path when
no SOAP-style parameters are present. This enables REST-style
HTTP GET requests with query parameters to work correctly.
> query string not passed when http get rest without soap
> -------------------------------------------------------
>
> Key: AXIS2C-1626
> URL: https://issues.apache.org/jira/browse/AXIS2C-1626
> Project: Axis2-C
> Issue Type: Bug
> Components: core/transport
> Affects Versions: 1.7.0
> Environment: AIX
> Reporter: Jean-Marc Lamond
> Priority: Minor
> Labels: patch
> Fix For: 2.0.0
>
> Attachments: http_sender.c.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> http_sender.c module does not include query string for "http get with REST
> (no soap).
> I have change the following line of codes:
> More or Less line 6xx.
> /* Processing HTTP GET, HEAD and DELETE */
> axis2_char_t *request_params = NULL;
> axis2_char_t *path = NULL;
> request_params = axis2_http_sender_get_param_string(sender, env,
> msg_ctx);
> if(request_params)
> {
> /* substituting AXIS2_Q_MARK for "?" */
> path = axutil_strcat(env, axutil_url_get_path(url, env),
> AXIS2_Q_MARK_STR,
> request_params, NULL);
> AXIS2_FREE(env->allocator, request_params);
> request_params = NULL;
> }
> else
> {
> request_params = axutil_url_get_query(url, env);
> if(request_params)
> {
> /* filling back REST Query String (no soap) */
> path = axutil_strcat(env,
> axutil_url_get_path(url, env),
> axutil_url_get_query(url, env), NULL);
> AXIS2_FREE(env->allocator, request_params);
> request_params = NULL;
> }
> else
> {
> path = axutil_strdup(env,
> axutil_url_get_path(url, env));
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]