Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improved HttpConnection#buildBaseUrl to allow usage of Paths #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Likqez wants to merge 1 commit into arangodb:master from Likqez:main
Closed

Conversation

Copy link

@Likqez Likqez commented Apr 24, 2021

This PR changes the behavior on how the base URL for the HttpConnection was constructed.

Now possible:

  • Accessing Arango behind a reverse Proxy e.G. example.com/arango

Copy link
Collaborator

rashtao commented Apr 26, 2021

Hi @Likqez ,
can you please provide a specific example or a unit test to clarify the need for such changes?

Copy link
Author

Likqez commented Apr 26, 2021

Because requests are HTTP based they should also behave that way.
The other arango drivers are also mostly working with URLs and therefor already supporting paths.

The java driver should also support "normal" URL like requests.

Using the unchanged function, the port would be added after the path
example.com/arango:443 instead of example.com:443/arango

My changes only fixes the wrong URL construction. Even if it's an unintentional use case.

rashtao and Day-Hawk reacted with thumbs up emoji

@rashtao rashtao self-assigned this Apr 26, 2021
Copy link
Author

Likqez commented Jun 8, 2021

Any updates on this?

@rashtao rashtao self-requested a review June 10, 2021 07:11
Copy link
Collaborator

@rashtao rashtao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I agree with the idea of supporting url paths, the proposed approach is a bit confusing from an API standpoint, since it splits the host string to insert the port into it.
A cleaner approach could be introducing a new configuration property, i.e. named urlPath, and appending it to the url string.

Copy link
Collaborator

rashtao commented Jun 23, 2021

URL paths support has also impact on parsing dynamically acquired hosts endpoints, triggered by acquireHostList settings.
But unfortunately URL paths are not officially supported by ArangoDB, as you can see in the documentation related to endpoints name format:

Even if it works for some db versions, this is not intentionally allowed, not tested and the db behavior could change in the future.
Therefore I would close this for now and reconsider it in case the db will officially support URL paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@rashtao rashtao rashtao requested changes

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /