You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by ro...@apache.org on 2026/01/25 05:12:25 UTC
(axis-axis2-c-core) 05/06: Preserve URL query string for REST HTTP GET requests (AXIS2C-1626)
This is an automated email from the ASF dual-hosted git repository.
robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git
commit ac7791963022fbd95e42a6d62d28a8dd75fe9ced
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Sat Jan 24 19:01:41 2026 -1000
Preserve URL query string for REST HTTP GET requests (AXIS2C-1626)
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.
Co-Authored-By: Claude Opus 4.5 <no...@anthropic.com>
---
src/core/transport/http/sender/http_sender.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/core/transport/http/sender/http_sender.c b/src/core/transport/http/sender/http_sender.c
index d926799a0..62045961f 100644
--- a/src/core/transport/http/sender/http_sender.c
+++ b/src/core/transport/http/sender/http_sender.c
@@ -700,7 +700,18 @@ axis2_http_sender_send(
}
else
{
- path = axutil_strdup(env, axutil_url_get_path(url, env));
+ /* AXIS2C-1626: Check if URL already has a query string (REST without SOAP).
+ * If present, preserve it in the request path. */
+ axis2_char_t *query = axutil_url_get_query(url, env);
+ if(query)
+ {
+ /* query includes the '?' character */
+ path = axutil_strcat(env, axutil_url_get_path(url, env), query, NULL);
+ }
+ else
+ {
+ path = axutil_strdup(env, axutil_url_get_path(url, env));
+ }
}
if(send_via_get)