Issue 11567: http.server error message format (original) (raw)

Created on 2011-03-16 03:36 by ivanrdg, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
11567.patch gennad,2011-03-17 06:45 Sets global variable DEFAULT_ERROR_MESSAGE on the module http.server to W3C standard value and improves wording a bit review
Messages (11)
msg131086 - (view) Author: Ivan Radigales Creus (ivanrdg) Date: 2011-03-16 03:36
The global variable DEFAULT_ERROR_MESSAGE on the module http.server is set to a non W3C standard value. It would be better to use something like: DEFAULT_ERROR_MESSAGE = """\ Error response

Error response

Error code %(code)d.

Message: %(message)s.

Error code explanation: %(code)s = %(explain)s.

""" That follows the W3C standards and validates successful on the http://validator.w3.org Thanks!
msg131219 - (view) Author: Gennadiy Zlobin (gennad) * Date: 2011-03-17 04:48
I take this issue
msg131220 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-03-17 04:50
go ahead. please submit a patch.
msg131227 - (view) Author: Gennadiy Zlobin (gennad) * Date: 2011-03-17 06:45
Hi guys, this is my first patch for the Python interpreter. Hope it is ok, but if it is not, be sure to comment and I'll fix it ASAP
msg131236 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-17 08:48
New changeset db4967095f10 by Senthil Kumaran in branch '3.2': Fix : http.server DEFAULT_ERROR_MESSAGE format. Patch by Gennadiy Zlobin. http://hg.python.org/cpython/rev/db4967095f10
msg131237 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-03-17 08:50
Fixed in 3.3 and 3.2.
msg131313 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-03-18 02:52
This is just nitpicking, but serving XHTML as text/html is wrong. Also XHTML is not necessary here, so I would just use an HTML 4.01 strict doctype (and remove the xmlns).
msg131465 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-20 00:23
I agree with Ezio. I noticed the commit but didn’t comment: I wanted to bring up the subject of HTML-producing modules in the stdlib and advocate use of HTML 5 (for real, pragmatic reasons, not because of a mode effect—I’ll dig up a number of links that explain the problems with pseudo-XHTML).
msg131467 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2011-03-20 02:35
Ezio Melotti wrote: > This is just nitpicking, but serving XHTML as text/html is wrong. While, I thought this statement is correct and expected the Internet media-type should be something else (application/xhtml+xml), but as per w3c, it is not wrong to serve XHTML as text/html (RFC 3236) Also, have a look at the example given at: http://www.w3.org/QA/2002/04/Web-Quality Validating the present output using the validator will give a green signal too. >Also XHTML is not necessary here, so I would just use an HTML 4.01 >strict doctype (and remove the xmlns). Agree to this. Although at the moment it does not cause any harm, it is a good to be plain HTML when it is a http server. Éric - HTML5 is not a standard yet and when it becomes one (or much earlier, when it becomes a de-facto standard), then html producing stdlib modules should move to it. I don't think we should move faster than browsers or html client applications.
msg131470 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-20 02:45
New changeset 135a0d7bc4db by Senthil Kumaran in branch '3.1': Issue #11567 - Let's have the DOCTYPE as HTML instead of XHTML. http://hg.python.org/cpython/rev/135a0d7bc4db
msg131509 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-20 16:37
Well, it is possible to disagree with the W3C on that particular point :) http://hixie.ch/advocacy/xhtml http://www.xml.com/pub/a/2004/07/21/dive.html http://www.cs.tut.fi/~jkorpela/html/empty.html http://diveintomark.org/archives/2004/01/14/thought_experiment
History
Date User Action Args
2022-04-11 14:57:14 admin set github: 55776
2011-03-20 16:37:48 eric.araujo set nosy:orsenthil, ezio.melotti, eric.araujo, python-dev, gennad, ivanrdgmessages: +
2011-03-20 02:45:56 python-dev set nosy:orsenthil, ezio.melotti, eric.araujo, python-dev, gennad, ivanrdgmessages: +
2011-03-20 02:35:17 orsenthil set nosy:orsenthil, ezio.melotti, eric.araujo, python-dev, gennad, ivanrdgmessages: +
2011-03-20 00:23:42 eric.araujo set nosy:orsenthil, ezio.melotti, eric.araujo, python-dev, gennad, ivanrdgmessages: +
2011-03-19 20:54:18 ezio.melotti set nosy: + eric.araujo
2011-03-18 02:52:44 ezio.melotti set nosy: + ezio.melottimessages: +
2011-03-17 08:50:11 orsenthil set status: open -> closedmessages: + resolution: fixednosy:orsenthil, python-dev, gennad, ivanrdg
2011-03-17 08:48:39 python-dev set nosy: + python-devmessages: +
2011-03-17 06:45:16 gennad set files: + 11567.patchmessages: + keywords: + patchnosy:orsenthil, gennad, ivanrdg
2011-03-17 04:50:52 orsenthil set versions: + Python 3.3nosy: + orsenthilmessages: + assignee: orsenthiltype: performance -> behavior
2011-03-17 04:48:31 gennad set nosy: + gennadmessages: +
2011-03-16 03:36:55 ivanrdg create