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

urllib2 regression #43858

Closed
jjlee mannequin opened this issue Aug 19, 2006 · 5 comments
Closed

urllib2 regression #43858

jjlee mannequin opened this issue Aug 19, 2006 · 5 comments
Labels
stdlib Python modules in the Lib dir

Comments

@jjlee
Copy link
Mannequin

jjlee mannequin commented Aug 19, 2006

BPO 1542948
Nosy @birkenfeld
Files
  • header-case.patch
  • header-case-with-tests.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 = None
    closed_at = <Date 2006-08-20.13:15:55.000>
    created_at = <Date 2006-08-19.01:48:11.000>
    labels = ['library']
    title = 'urllib2 regression'
    updated_at = <Date 2006-08-20.13:15:55.000>
    user = 'https://bugs.python.org/jjlee'

    bugs.python.org fields:

    activity = <Date 2006-08-20.13:15:55.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2006-08-19.01:48:11.000>
    creator = 'jjlee'
    dependencies = []
    files = ['7487', '7488']
    hgrepos = []
    issue_num = 1542948
    keywords = ['patch']
    message_count = 5.0
    messages = ['50952', '50953', '50954', '50955', '50956']
    nosy_count = 3.0
    nosy_names = ['nnorwitz', 'georg.brandl', 'jjlee']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1542948'
    versions = ['Python 2.5']

    @jjlee
    Copy link
    Mannequin Author

    jjlee mannequin commented Aug 19, 2006

    Patch 1459963 (applied in 50842) needlessly breaks the
    old (albeit undocumented) interface of direct access to
    request.headers (which existed prior to the
    introduction of method. That patch changes the case of
    the keys of the request.headers dictionary. That seems
    guaranteed to break existing code.

    The attached patch reverts 50842's changes to urllib2
    (it does not revert the changes to urllib) and fixes
    the reported issue with a one-line fix in
    AbstractHTTPHandler (.title()-case the HTTP headers
    before sending them to httplib). That fix is also more
    localised to HTTP -- urllib2 knows about other
    protocols too. This patch also corrects a mis-wording
    in Misc/NEWS: the old case convention was not strictly
    incorrect (according to RFC 2616), but just did not
    follow the usual title-case convention.

    If the original patch was applied to the 2.4
    maintenance branch, I guess this patch should be
    applied there too.

    @jjlee jjlee mannequin closed this as completed Aug 19, 2006
    @jjlee jjlee mannequin added the stdlib Python modules in the Lib dir label Aug 19, 2006
    @jjlee jjlee mannequin closed this as completed Aug 19, 2006
    @jjlee jjlee mannequin added the stdlib Python modules in the Lib dir label Aug 19, 2006
    @jjlee
    Copy link
    Mannequin Author

    jjlee mannequin commented Aug 19, 2006

    Logged In: YES
    user_id=261020

    s/(which existed prior to the introduction of method/(which
    existed prior to the introduction of the .get_header() &c.
    methods)/

    @nnorwitz
    Copy link
    Mannequin

    nnorwitz mannequin commented Aug 19, 2006

    Logged In: YES
    user_id=33168

    I would like to see additional tests to ensure something
    like this doesn't happen again.

    @jjlee
    Copy link
    Mannequin Author

    jjlee mannequin commented Aug 19, 2006

    Logged In: YES
    user_id=261020

    Quite right, here's a patch with the missing test.

    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=849994

    Applied as rev. 51416, 51417 (2.5)

    @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
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant