[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2016-02-02 Thread Ent
Changes by Ent : -- status: open -> languishing ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-10-25 Thread Ent
Ent added the comment: Hi, Is it possible for this patch to be reviewed now? Regards, Ent -- ___ Python tracker ___ ___ Python-bugs-

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-06-18 Thread Ent
Ent added the comment: Thanks Ned & Berker, I can only imagine the amount of work the core devs have to deal with. Hope my patch makes it through in next version. Regards, Ent -- ___ Python tracker __

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-06-18 Thread Berker Peksag
Berker Peksag added the comment: Ned is correct. I started to review the patch, but couldn't find time to do a complete review. I'll take a look at it in a week or two. Thanks! -- assignee: -> berker.peksag ___ Python tracker

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-06-17 Thread Ned Deily
Ned Deily added the comment: Ent, thanks for all your work on this, and thanks to Demian and Martin for their reviews. In the meantime, the Python 3.5 release cycle has reached feature code cutoff so, at this point, generally only bug fixes are being accepted into 3.5, which means this refacto

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-06-17 Thread Ent
Ent added the comment: Hello, Since this patch is in acceptable state, should the Status or Resolution be changed so that it is flagged to be merged into Python 3.5? Thanks. -- ___ Python tracker ___

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-10 Thread Martin Panter
Martin Panter added the comment: Opened Issue 23440 for my test changes -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-04 Thread Ent
Ent added the comment: No I think it's better if you put up a separate patch. That way any questions other reviewers will have, you will be better suited to answer them. Cheers! -- ___ Python tracker

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-02 Thread Martin Panter
Martin Panter added the comment: You’re welcome to merge my test patch into yours if you want to. Or I could open a separate issue for it, I don’t mind. -- ___ Python tracker __

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-01 Thread Ent
Ent added the comment: @vadmium: Thanks for the suggestion - I opted for the first one. While I wasn't happy with it being called twice, wasn't getting an idea of how to address it. Am I supposed to include your patch as part of my patch? I am not much knowledgeable about the protocol to follo

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-01 Thread Martin Panter
Martin Panter added the comment: Here is another addition to the existing test suite to detect the bug with the duplicate 404 Not Found responses. It relies on running the non-Windows, non-root test that says # chmod() doesn't work as expected on Windows, and filesystem # permissions are ignor

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-31 Thread Ent
Ent added the comment: I have updated the patch such that for any directory, if they have a file with name in index_files, it will be served by default. Also a few tweaks. -- Added file: http://bugs.python.org/file37951/Feb1st.patch ___ Python tracke

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-31 Thread Martin Panter
Martin Panter added the comment: Here is an enhancement to the existing SimpleHTTPServerTestCase.test_get() test case, that demonstrates the current implementation breaks serving index.html files by default. -- Added file: http://bugs.python.org/file37947/index-test.patch

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-28 Thread Ent
Ent added the comment: Thanks for the update! I wasn't expecting this to be such a friendly & positive experience. Glad to be proven wrong :) -- ___ Python tracker ___ _

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-27 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the updated patch. I will tweak the docs before I commit the patch. -- ___ Python tracker ___

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-27 Thread Ent
Ent added the comment: Latest patch with simpler(?) logic? @Demian: This is a tough task! And I appreciate your kind words. I have gone through your comments and I have made a few changes as per your suggestion but I have refrained from a few as well. > get_status_type, apply_success_headers,

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-26 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the extra effort on this to satisfy multiple people's opinions. It's never an easy thing, especially when dealing with a decentralized group. My following comments are largely based on the public API. I haven't done a full review of the changes made

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-24 Thread Ent
Ent added the comment: Based on the comments of many good netizens, I have further updated the patch. -- Added file: http://bugs.python.org/file37849/jan25.patch ___ Python tracker _

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-24 Thread Ent
Ent added the comment: New patch for review! Let me know if anything is missing. -- Added file: http://bugs.python.org/file37840/jan24th.patch ___ Python tracker ___

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: > @demian: If you don't mind, could you please elaborate a bit more on > `_resolve_path()` you mentioned in the review/comment? Sure. In your patch, you have redirect_browser (or redirect if you renamed it), which sounds like it's allowing for a very generic eve

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Berker Peksag
Berker Peksag added the comment: > I would love to use HTTPStatus but for some reason http/__init__.py is devoid > of code related to it - > https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py See the default branch: https://hg.python.org/cpython/file/default/Lib/http/__init_

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Ent
Ent added the comment: @demian: If you don't mind, could you please elaborate a bit more on `_resolve_path()` you mentioned in the review/comment? Or maybe link me to the type of behaviour you mentioned? I will accordingly make the changes. As for self.apply_headers, I will see if I can make i

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Ent
Ent added the comment: @demian: That's a tall order! :) I would love to use HTTPStatus but for some reason http/__init__.py is devoid of code related to it - https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py I wasn't sure why this change was made because it like feels a ste

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-23 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the work! I'm not sure why the last patch doesn't appear on Rietveld, so (unfortunately) here's the result of my review. I've only covered functional aspects in this run at it: +base_files = ['index.html', 'index.htm'] Can you use "index_files"

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-20 Thread Ent
Ent added the comment: Following is updated patch with * Refactored code with helper functions * Unit Tests * Documentation - Explanation + Examples SimpleHTTPRequestHandler's copyfile has been renamed to copy_file but not shutils'. -- Added file: http://bugs.python.org/file37786/help

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-19 Thread Demian Brecht
Changes by Demian Brecht : -- nosy: +demian.brecht ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-18 Thread Ent
Ent added the comment: I am having some issues with replying to comments on review page. It is giving 500 error hence posting replies here. @berker.peksag: Thanks! I will add the methods' documentation & examples into the Doc/library/http.server.rst. As well as include a few unit tests. I sea

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Ent
Ent added the comment: @vadmium: My Mistake. It should read "file path" not "file object". (500 error when submitting to review page.) Renaming get_html_or_dir_path to get_path_or_dir for accurate description. Also renaming copyfile to more pythonic copy_file. -- Added file: http://bu

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Ent
Ent added the comment: Changing base_files to point @ ['index.htm', 'index.html'] -- Added file: http://bugs.python.org/file37737/simplehttp1.patch ___ Python tracker ___ __

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Berker Peksag
Berker Peksag added the comment: > +base_files = ['index.html', 'index.html'] I guess this should be ['index.htm', 'index.html']. -- ___ Python tracker ___ _

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review versions: +Python 3.5 -Python 3.4 ___ Python tracker ___ __

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Ent
New submission from Ent: Use of http.server.BaseHTTPRequestHandler for exploratory or simple usage, SimpleHTTPRequestHandler provides a good platform to start on. However, the current code in SimpleHTTPRequestHandler's send_head is tightly coupled together as a single unit. This patch aims to