Navigation Menu

Skip to content
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

Fixed a bug regarding using custom port for confluence #2

Closed
wants to merge 1 commit into from

Conversation

wooyeong
Copy link

@wooyeong wooyeong commented Jul 26, 2017

When a confluence server is hosted on custom web port, Alfred Confluence gives quick search results well, but navigates to wrong URL for found pages.

If the confluence address is https://wiki.example.com:8443, Alfred Confluence trys to connect https://wiki.example.com/dosearchsite.action?queryString=[query], :8443 was gone.

Here are screenshots.


  • Pages found

Query succees

  • Port number has gone on navigation, so unable to see content.

Wrong URL access


To fix this, this pull request changes a line of code, replacing urlparse.hostname to urlparse.netloc. I think there's no side effect on this change, here's a simple test.

# cat test.py
from urlparse import urlparse

urls = ['https://c.mins.site:8443/', "https://a.b.c/", "http://confluence.example.com", "http://d.e.f:223"]

for url in urls:

    parsed = urlparse(url)

    print(parsed)
    print(parsed.hostname)
    print(parsed.netloc)
ParseResult(scheme='https', netloc='c.mins.site:8443', path='/', params='', query='', fragment='')
c.mins.site
c.mins.site:8443
ParseResult(scheme='https', netloc='a.b.c', path='/', params='', query='', fragment='')
a.b.c
a.b.c
ParseResult(scheme='http', netloc='confluence.example.com', path='', params='', query='', fragment='')
confluence.example.com
confluence.example.com
ParseResult(scheme='http', netloc='d.e.f:223', path='', params='', query='', fragment='')
d.e.f
d.e.f:223

I've tested on both single instance configuration and multiple instances configuration using .alfred-confluence.json.

@skleinei
Copy link
Owner

Thanks for that. I've manually made this change.

@skleinei skleinei closed this Sep 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants