pdoc3 / pdoc3/pdoc

HTTP server will not serve images

Open
#267 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue Hacktoberfest
Dominant language
Python
Stars
1.2k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

Images are served by http server

Actual Behavior

Images return a 302 and a URL that ultimately results in a 404.

Steps to Reproduce
  1. Generate documentation that has images
  2. Run the http server
Additional info
Starting pdoc server on localhost:8080
pdoc server ready at http://localhost:8080
127.0.0.1 - - [08/Oct/2020 19:05:00] "GET /modelgen.modelgen/ HTTP/1.1" 200 -
127.0.0.1 - - [08/Oct/2020 19:05:00] "GET /modelgen.modelgen/img/screw_hole.svg HTTP/1.1" 302 -
127.0.0.1 - - [08/Oct/2020 19:05:00] "GET /modelgen.modelgen/img/screw_hole.svg/ HTTP/1.1" 404 -

Note that accessing the files directly via file:// works as expected.

  • pdoc version: 0.9.1

Contributor guide

Open the contributing guide

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 failure with the documented pdoc command, generating HTML with an image and starting the HTTP server. Trace how the server handles the image URL and redirect; done means the image URL returns the image directly instead of redirecting to a 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.