[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-09-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a58b620e4dc9 by Senthil Kumaran in branch '2.7':
Fix SimpleHTTPServer's request handling case on trailing '/'.
http://hg.python.org/cpython/rev/a58b620e4dc9

New changeset 1fcccbbe15e2 by Senthil Kumaran in branch '3.3':
Fix http.server's request handling case on trailing '/'.
http://hg.python.org/cpython/rev/1fcccbbe15e2

New changeset b85c9d2a5227 by Senthil Kumaran in branch 'default':
Fix http.server's request handling case on trailing '/'.
http://hg.python.org/cpython/rev/b85c9d2a5227

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-09-13 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the patches, Vajrasky and Karl. Fixed in currently active (3.4,3.3 
and 2.7) versions of python.

--
assignee:  - orsenthil
resolution:  - fixed
stage: test needed - committed/rejected
status: open - closed
versions:  -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-07-08 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Attached the fix and the unit test for this problem.

--
nosy: +vajrasky
Added file: 
http://bugs.python.org/file30863/patch_for_fixing_the_server_serving_the_url_with_trailing_slash.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-07-06 Thread Senko Rasic

Senko Rasic added the comment:

The attached test (issue-17324-test-1) reproduces the issue for me on 
3.4.0alpha.

--
nosy: +senko

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-03-06 Thread karl

karl added the comment:

orsenthil, 

would that test work?
See issue-17324-test-1.patch

Here the result of the test which is FAIL as planned (given the current issue).

→ ./python.exe Lib/test/test_httpservers.py 

test_header_buffering_of_send_error (__main__.BaseHTTPRequestHandlerTestCase) 
... ok
[…]

test_get (__main__.SimpleHTTPServerTestCase) ... FAIL

[…]

test_start_with_double_slash (__main__.SimpleHTTPRequestHandlerTestCase) ... ok

==
FAIL: test_get (__main__.SimpleHTTPServerTestCase)
--
Traceback (most recent call last):
  File Lib/test/test_httpservers.py, line 254, in test_get
self.check_status_and_reason(response, 404, data=self.data)
  File Lib/test/test_httpservers.py, line 243, in check_status_and_reason
self.assertEqual(response.status, status)
AssertionError: 200 != 404

--
Ran 39 tests in 4.382s

FAILED (failures=1)
Traceback (most recent call last):
  File Lib/test/test_httpservers.py, line 686, in module
test_main()
  File Lib/test/test_httpservers.py, line 680, in test_main
SimpleHTTPRequestHandlerTestCase,
  File /Users/karl/Documents/2011/cpython/Lib/test/support.py, line 1589, in 
run_unittest
_run_suite(suite)
  File /Users/karl/Documents/2011/cpython/Lib/test/support.py, line 1564, in 
_run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File Lib/test/test_httpservers.py, line 254, in test_get
self.check_status_and_reason(response, 404, data=self.data)
  File Lib/test/test_httpservers.py, line 243, in check_status_and_reason
self.assertEqual(response.status, status)
AssertionError: 200 != 404

[141593 refs]

--
keywords: +patch
nosy: +karlcow
Added file: http://bugs.python.org/file29329/issue-17324-test-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-03-01 Thread Larry Hastings

New submission from Larry Hastings:

To reproduce:

1) Create a file called foo.txt in the local directory, put whatever you like 
in it.
2) Run python -m SimpleHTTPServer or python3 -m http.server.
3) Point your web browser at http://127.0.0.1:8000/foo.txt/;.
4) Note that the server has served the contents of foo.txt as foo.txt/.  It 
shouldn't do that!

Reproduced with 2.7.3, 3.2.3, and 3.3.0.  I assume it's still there in trunk.

--
components: Library (Lib)
keywords: easy
messages: 183247
nosy: larry
priority: low
severity: normal
status: open
title: SimpleHTTPServer serves files even if the URL has a trailing slash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-03-01 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
stage:  - test needed
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17324] SimpleHTTPServer serves files even if the URL has a trailing slash

2013-03-01 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I thought this was fixed (recently). Shall look again. Having the tests is the 
only hard part here.

--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17324
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com