Extend http proxy to support urls with a duplicated parameter with different values#7456
Merged
juanluisrp merged 1 commit intoMar 12, 2024
Conversation
Contributor
|
Added a PR with the change to the proxy library mitre/HTTP-Proxy-Servlet#243. |
7b67e82 to
8db06b1
Compare
Extend URITemplateProxyServlet to support urls with a duplicated parameter with different values, like: param1=value1¶m1=value2¶m1=value3 Fix wrong init parameter name
b00cd29 to
7198ba7
Compare
Collaborator
|
The backport to stderrstdoutTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-7456-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 7198ba760b8aab44d1c2141b2e707bc464c73f7f
# Push it to GitHub
git push --set-upstream origin backport-7456-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.xThen, create a pull request where the |
juanluisrp
added a commit
that referenced
this pull request
Mar 12, 2024
Extend URITemplateProxyServlet to support urls with a duplicated parameter with different values, like: param1=value1¶m1=value2¶m1=value3 Fix wrong init parameter name
juanluisrp
added a commit
that referenced
this pull request
Mar 12, 2024
Extend URITemplateProxyServlet to support urls with a duplicated parameter with different values, like: param1=value1¶m1=value2¶m1=value3 Fix wrong init parameter name Backport of #7456.
josegar74
added a commit
to GeoCat/core-geonetwork
that referenced
this pull request
Mar 12, 2024
10 tasks
juanluisrp
pushed a commit
that referenced
this pull request
Mar 12, 2024
geonetworkbuild
pushed a commit
that referenced
this pull request
Mar 12, 2024
juanluisrp
pushed a commit
that referenced
this pull request
Mar 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the http proxy doesn't support to send a parameter repeated in the url with different values. This causes Kibana when proxied to fail some requests like the following :
http://localhost:8080/geonetwork/dashboards/api/index_patterns/_fields_for_wildcard?pattern=gn-records&meta_fields=_source&meta_fields=_id&meta_fields=_type&meta_fields=_index&meta_fields=_score
The original code relies in
org.mitre.dsmiley.httpproxy.URITemplateProxyServlet.servicemethod, that used a list of parameters. This change uses a map with a list of values instead.It should be check to send a pull to https://github.com/mitre/HTTP-Proxy-Servlet to apply the changes in
org.mitre.dsmiley.httpproxy.URITemplateProxyServlet.service. But this can take a while until merged and released in HTTP-Proxy-Servlet project.Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation