ndmitchell / ndmitchell/hoogle

"server --local" behavior in Hoogle 5 interacts badly with Docker hosting

Open
#189 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Haskell
Stars
803
Forks
152
PR merge metrics
No merged PRs in 30d

Description

I have dockerized a local Hoogle server container, available here:

https://hub.docker.com/r/jwiegley/hoogle-local/

With Hoogle 4, this works perfectly fine. But with Hoogle 5, the port forwarding no longer works correctly. The thing is, I access the website using http://127.0.0.1:8687 from my machine, but it's not actually a localhost access from the point of view of Hoogle. So with Hoogle 5 I need to add --host, however, this changes the behavior somewhat:

  • Just hoogle server --local is inaccessible now, because I'm connecting through a port forward. This worked in Hoogle 4.
  • hoogle server --host '*' causes all links to appear as file:// links, making them unusable, because I don't have direct file access to the server.
  • hoogle server --local --host '*' rewrites search result links as http://127.0.0.1/file/..., but rewrites links within documentation pages as http://127.0.0.1/..., without the file/ leader. This makes search links clickable, but documentation links all report "file not found".

As a result, there is no combination that works anymore for Dockerized hoogle-local. This would work if --local --host '*' adds file/ leaders within documentation pages, as well as within search results.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with the Docker image and the commands hoogle server --local, --host '*', and --local --host '*', then inspect the server handling for generated links. Verify the result through http://127.0.0.1:8687: search-result and documentation links should both retain the file/ path and work through the forwarded port.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, haskell
Domain
backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.