Skip to content

Relax full body read timeout #90

Closed

Description

@ProgerXP

As of now, httputil.NewClient imposes a start-to-end request timeout, 60 seconds in case of package download.

func NewClient(timeout time.Duration) *http.Client {
return &http.Client{
Timeout: timeout,
Transport: &uaTransport{base: http.DefaultTransport},
}
}

As illustrated here, this timeout kicks in even if the package is being actively downloaded, just not "fast" enough:


(source)

This means it's impossible to download large packages on slow networks:

  • koreader: 42756024 bytes / 60 seconds * 8 ~ 5.7 Mbps minimally needed
  • zig: 84470833 / 60 * 8 ~ 11.2 Mbps

...rendering reManager unusable for those of us still stick with low speed 3G or ADSL. Increasing ProxyTimeout or removing Timeout from NetClient fixes the problem.

Using Dialer.Timeout, possibly together with other Transport timeouts, makes more sense if the goal is to ensure the user has connectivity at all.

Activity

  1. added
    bug
    on Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions