This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author karlcow
Recipients karlcow, orsenthil
Date 2013-03-05.12:21:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362486087.71.0.484772154915.issue17355@psf.upfronthosting.co.za>
In-reply-to
Content
Some of the tests of the HTTP Test suite are checking for the full status-line, instead of just the error code.


Why is it an issue?

1. The only mandatory part in the status-line is the error code. The phrase is optional. For example the response is made of 3 parts.

   HTTP/1.1 400 Bad Request
   ('HTTP/1.1', '400', 'Bad Request')

Only 400 is the mandatory part of the error code and is testing the error.

2. It creates dependencies on how we conceive, modify the construction of the status-line and error messages.

3. Some tests are testing messages with different "optional texts".

http://hg.python.org/cpython/file/3.3/Lib/test/test_httpservers.py#l640
Test for "HTTP/1.1 400 Line Too Long\r\n".
Instead of just testing "400". (A specific message could be put in the body, but that's informational)

http://hg.python.org/cpython/file/3.3/Lib/test/test_httpservers.py#l633
Test for "HTTP/1.1 414 Request-URI Too Long\r\n"
instead of just testing "414", btw the spec says for the optional message "URI Too Long"
http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-6.5.12

Testing the message, IMHO, should be only, for testing the construction of the message. The tests here are made for testing the right error code, but they try to do more.

Hope it helps :)

Threading: related to http://bugs.python.org/issue12921#msg183520
History
Date User Action Args
2013-03-05 12:21:27karlcowsetrecipients: + karlcow, orsenthil
2013-03-05 12:21:27karlcowsetmessageid: <1362486087.71.0.484772154915.issue17355@psf.upfronthosting.co.za>
2013-03-05 12:21:27karlcowlinkissue17355 messages
2013-03-05 12:21:27karlcowcreate