Skip to content

urllib / urllib2 should cache 301 redirections #38478

Closed

Description

@jjlee
mannequin
BPO 735515
Nosy @birkenfeld, @orsenthil, @devdanzin
Superseder
  • bpo-1755841: Patch for [ 735515 ] urllib2 should cache 301 redir
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/orsenthil'
    closed_at = <Date 2009-12-28.15:38:15.483>
    created_at = <Date 2003-05-10.00:21:26.000>
    labels = ['type-feature', 'library']
    title = 'urllib / urllib2 should cache 301 redirections'
    updated_at = <Date 2009-12-28.15:38:15.482>
    user = 'https://bugs.python.org/jjlee'

    bugs.python.org fields:

    activity = <Date 2009-12-28.15:38:15.482>
    actor = 'pitrou'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2009-12-28.15:38:15.483>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2003-05-10.00:21:26.000>
    creator = 'jjlee'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 735515
    keywords = []
    message_count = 5.0
    messages = ['53878', '53879', '61278', '61313', '86706']
    nosy_count = 5.0
    nosy_names = ['georg.brandl', 'jjlee', 'orsenthil', 'ajaksu2', 'vila']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '1755841'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue735515'
    versions = ['Python 2.7']

    Activity

    1. jjlee commented on May 10, 2003

      jjleemannequin
      MannequinAuthor

      urllib / urllib2 should cache the results of 301
      (permanent) redirections. This shouldn't break
      anything, since it's just an internal optimisation
      from one point of view -- but it's also what the
      RFC (2616, section 10.3.2, first para) says
      SHOULD happen.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on May 10, 2003
    3. orsenthil commented on Jul 6, 2007

      @orsenthil
      Member

      Hi gbrandll/jjlee,
      I am trying to understand the actual requirements here.
      Should the original url be avaiable to the user upon request as urllib
      automatically calls the redirect_request and provides the redirected url only?

      Please provide some details on this bug. I shall try to write a patch.

      Thanks,
      Senthil

    4. birkenfeld commented on Jan 20, 2008

      @birkenfeld
      Member

      John, what did you have in mind?

    5. jjlee commented on Jan 20, 2008

      jjleemannequin
      MannequinAuthor

      In what respect? I just meant that it would be nice (and more compliant
      with the RFC) if rather than fetching the original URL each time, a map
      of URLs to 301-redirected URLs was kept.

      For urllib2, I suppose the map would be a private attribute of
      HTTPRedirectHandler.

      There's no obvious need to provide any interface to get the intermediate
      URLs in the redirection chain.

    6. devdanzin commented on Apr 27, 2009

      devdanzinmannequin
      Mannequin

      Patch in bpo-1755841.

    7. self-assigned this
      on Aug 21, 2009
    8. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions