Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in http.client #56885

Closed
PCManticore mannequin opened this issue Aug 1, 2011 · 5 comments
Closed

Bug in http.client #56885

PCManticore mannequin opened this issue Aug 1, 2011 · 5 comments
Assignees
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@PCManticore
Copy link
Mannequin

PCManticore mannequin commented Aug 1, 2011

BPO 12676
Nosy @orsenthil, @merwok, @PCManticore
Files
  • issue12676_py33.patch
  • 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 2011-08-02.10:33:56.030>
    created_at = <Date 2011-08-01.13:19:33.604>
    labels = ['easy', 'type-bug', 'library']
    title = 'Bug in http.client'
    updated_at = <Date 2011-08-02.10:37:48.508>
    user = 'https://github.com/PCManticore'

    bugs.python.org fields:

    activity = <Date 2011-08-02.10:37:48.508>
    actor = 'orsenthil'
    assignee = 'orsenthil'
    closed = True
    closed_date = <Date 2011-08-02.10:33:56.030>
    closer = 'python-dev'
    components = ['Library (Lib)']
    creation = <Date 2011-08-01.13:19:33.604>
    creator = 'Claudiu.Popa'
    dependencies = []
    files = ['22821']
    hgrepos = []
    issue_num = 12676
    keywords = ['patch', 'easy']
    message_count = 5.0
    messages = ['141504', '141506', '141552', '141553', '141554']
    nosy_count = 5.0
    nosy_names = ['orsenthil', 'eric.araujo', 'santoso.wijaya', 'Claudiu.Popa', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue12676'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @PCManticore
    Copy link
    Mannequin Author

    PCManticore mannequin commented Aug 1, 2011

    There appears to be used a variable that is not defined in HTTPConnection.send method. The approximate line is 781. How to reproduce:
    import http.client
    import urllib.parse
    c = urllib.parse.urlencode({"user":"claudiu", "password":"1"})
    c = http.client.HTTPConnection("192.168.71.38")
    c.request("POST", "test", c) # silly, I now.

    There should be raised a TypeError here, but instead the error is:
    File "C:\Python32\lib\http\client.py", line 781, in send
    or an iterable, got %r " % type(it))
    NameError: global name 'it' is not defined

    @PCManticore PCManticore mannequin added the stdlib Python modules in the Lib dir label Aug 1, 2011
    @merwok
    Copy link
    Member

    merwok commented Aug 1, 2011

    It looks like “it” should be “data”.

    @merwok merwok added the easy label Aug 1, 2011
    @santosowijaya santosowijaya mannequin added the type-bug An unexpected behavior, bug, or error label Aug 1, 2011
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 2, 2011

    New changeset 1013c9fbd83c by Senthil Kumaran in branch '3.2':
    Fix closes bpo-12676 - Invalid identifier used in TypeError message in http.client.
    http://hg.python.org/cpython/rev/1013c9fbd83c

    @python-dev python-dev mannequin closed this as completed Aug 2, 2011
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Aug 2, 2011

    New changeset c099ba0a278e by Senthil Kumaran in branch 'default':
    Fix closes bpo-12676 - Invalid identifier used in TypeError message in http.client.
    http://hg.python.org/cpython/rev/c099ba0a278e

    @orsenthil
    Copy link
    Member

    Thanks for the bug report, Popa Claudiu and Patch Santoso Wijaya.
    Ouch, pretty ugly bug - shows the code lacked test coverage.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants