Skip to content

Different ajax requests for empty params using proxy #3144

@offtherailz

Description

@offtherailz

Description

Performing ajax ( ajax.js) requests with undefined params values causes different query strings using or not using proxy.
If you use proxy, the params with undefined values will be added to the request this:

paramName1=&paramName2

This doesn't happen if the request is performed directly to the server. This is because of this intercept
https://github.com/geosolutions-it/MapStore2/blob/master/web/client/libs/ajax.js#L117

Example:

with :

params : { CQL_FILTER: undefined}

You will have an additional parameter in queryString ...&CQL_FILTER= (empty). If the request is performed by axios without this intercept ,the undefined value is not used as parameter.

In case of Bug (otherwise remove this paragraph)

Browser Affected
any

Steps to reproduce

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions