Skip to content

Urllib screws up capitalization in "User-Agent" HTTP Header #60592

Closed

Description

@CalvinOwens
BPO 16388
Nosy @jcea, @orsenthil
Superseder
  • bpo-2275: Make urllib.request.Request.has_header() etc case-insensitive
  • 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 = None
    closed_at = <Date 2012-11-02.17:01:56.453>
    created_at = <Date 2012-11-02.16:54:13.633>
    labels = ['type-bug', 'library']
    title = 'Urllib screws up capitalization in "User-Agent" HTTP Header'
    updated_at = <Date 2012-11-08.06:27:52.736>
    user = 'https://bugs.python.org/CalvinOwens'

    bugs.python.org fields:

    activity = <Date 2012-11-08.06:27:52.736>
    actor = 'orsenthil'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-11-02.17:01:56.453>
    closer = 'r.david.murray'
    components = ['Library (Lib)']
    creation = <Date 2012-11-02.16:54:13.633>
    creator = 'Calvin.Owens'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 16388
    keywords = []
    message_count = 3.0
    messages = ['174540', '174547', '175135']
    nosy_count = 3.0
    nosy_names = ['jcea', 'orsenthil', 'Calvin.Owens']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '2275'
    type = 'behavior'
    url = 'https://bugs.python.org/issue16388'
    versions = ['Python 3.2']

    Activity

    1. CalvinOwens commented on Nov 2, 2012

      CalvinOwensmannequin
      MannequinAuthor

      Urllib encodes as: "User-agent"
      The correct form is: "User-Agent"

      This is quite important, as it makes this library totally unusable for scraping moronic websites which require a recognized User-Agent string to work correctly, of which there are many.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Nov 2, 2012
    3. CalvinOwens commented on Nov 2, 2012

      CalvinOwensmannequin
      MannequinAuthor

      2275 hasn't been touched for almost 2 years.

      If there was a fix in v3.3, it ought to be backported. But it doesn't look like they ever came up with one.

    4. orsenthil commented on Nov 8, 2012

      @orsenthil
      Member

      Calvin. - I shall act upon old bug. The tricky nature of backwards compatibility sometimes let's it stale because we can not come t a good conclusion.

    5. transferred this issue fromon Apr 10, 2022
    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

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions