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

http.server's send_error could set the content-length of the error body #60292

Closed
pitrou opened this issue Sep 29, 2012 · 6 comments
Closed

http.server's send_error could set the content-length of the error body #60292

pitrou opened this issue Sep 29, 2012 · 6 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Sep 29, 2012

BPO 16088
Nosy @jcea, @orsenthil, @pitrou
Files
  • http_error_content_length.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 2012-10-11.06:19:07.606>
    created_at = <Date 2012-09-29.23:02:31.345>
    labels = ['type-feature', 'library']
    title = "http.server's send_error could set the content-length of the error body"
    updated_at = <Date 2012-10-11.06:19:07.604>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2012-10-11.06:19:07.604>
    actor = 'orsenthil'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-10-11.06:19:07.606>
    closer = 'orsenthil'
    components = ['Library (Lib)']
    creation = <Date 2012-09-29.23:02:31.345>
    creator = 'pitrou'
    dependencies = []
    files = ['27349']
    hgrepos = []
    issue_num = 16088
    keywords = ['patch']
    message_count = 6.0
    messages = ['171597', '171598', '172520', '172612', '172622', '172623']
    nosy_count = 4.0
    nosy_names = ['jcea', 'orsenthil', 'pitrou', 'python-dev']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16088'
    versions = ['Python 3.4']

    @pitrou
    Copy link
    Member Author

    pitrou commented Sep 29, 2012

    BaseHTTPRequestHandler.send_error() sets "connection: close", so the client shouldn't need a content-length, but it can still be nicer to send it (e.g. it seems to solve an issue with wget, see bpo-15991).

    @pitrou pitrou added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Sep 29, 2012
    @pitrou
    Copy link
    Member Author

    pitrou commented Sep 29, 2012

    Here is a patch.

    @orsenthil
    Copy link
    Member

    +1 to this change. It may be helpful in the cases like bpo-15991.

    @jcea
    Copy link
    Member

    jcea commented Oct 11, 2012

    Looks good.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 11, 2012

    New changeset ee34cb049a10 by Senthil Kumaran in branch 'default':
    Issue bpo-16088: BaseHTTPRequestHandler's send_error method includes a
    http://hg.python.org/cpython/rev/ee34cb049a10

    @orsenthil
    Copy link
    Member

    I took the privilege of testing, adding news and docs and committing it.

    Thank you!

    @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 type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants