[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2022-03-15 Thread Colin 't Hart


Colin 't Hart  added the comment:

1. This module is scheduled to be removed by Python 3.13 (although I 
preseonally am of the opinion that it is a useful module and would like to see 
it brought up-to-date).
2. Is reset() even necessary anymore? Can't the same results be achieved with 
CSS since we are in the third decade of the 2000s after all?

--
nosy: +cthart

___
Python tracker 

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2021-03-18 Thread coyot linden


coyot linden  added the comment:

Ran into this also, got:

AH02429: Response header name 

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2020-09-12 Thread igs


igs  added the comment:

As mentioned above standard Apache does not accept the extra characters anymore 
and produces '500 internal error'. So the normal behaviour of this module makes 
things worse in most cases instead of being helpful.

--
nosy: +igs

___
Python tracker 

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2020-03-14 Thread Ryan Tu


Ryan Tu  added the comment:

#Maybe not a good solution
I do not know the should we delete the code in cgitb.py or adjust the 
configration of apache httpd. My solution is deleting some code as follows:
```
return '''
 -->
 --> -->
  
   '''
```
Then it works very well, and it has good view.Anyone know what is the situation 
in ngix?

--
nosy: +Ryan Tu
versions: +Python 3.8 -Python 2.7, Python 3.2, Python 3.3, Python 3.5

___
Python tracker 

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2017-05-20 Thread Артур Клесун

Артур Клесун added the comment:

Apache started strict check of headers ch
aracters to be valid recently. That causes it fail on "<--: spam".

```
[Sat May 20 13:09:23.056673 2017] [http:error] [pid 26379] [client 
12.34.567.41:60988] AH02429: Response header name 

[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear

p0lar_bear added the comment:

I get similar results if my CGI script sends a Content-Type header of anything 
besides text/html, e.g. print('Content-Type: text/json').

--
nosy: +p0lar_bear

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2013-07-16 Thread p0lar_bear

Changes by p0lar_bear t3hp0larb...@gmail.com:


--
versions: +Python 3.3

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran orsent...@gmail.com:


--
nosy: +orsenthil

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-14 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Yes, I saw the !--: spam string in headers, but it seems that this string 
doesn't make problems. The displaying page is correct.


But after I apply the changes you mentioned:
-return '''!--: spam
+return '''\r\n\r\n!--: spam


I got text/plain output, and the response headers are like this:

DateFri, 14 May 2010 07:30:03 GMT
Server  Apache/2.2.15 (Unix)
Keep-Alive  timeout=5, max=100
Connection  Keep-Alive
Transfer-Encoding   chunked
Content-Typetext/plain



And the content is like this:

!--: spam
Content-Type: text/html

body bgcolor=#f0f0f8font color=#f0f0f8 size=-5 --
body bgcolor=#f0f0f8font color=#f0f0f8 size=-5 -- --

..



So the hole page is not displayed correctly!

Is there any problem with me?

--
nosy: +ysj.ray

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Daniel Stutzbach

New submission from Daniel Stutzbach dan...@stutzbachenterprises.com:

If the CGI script crashes before finishing the headers, cgitb will emit invalid 
HTTP headers before showing the error message.  Below are HTTP headers I 
received, captured with a packet sniffer.  Note the --: spam.

HTTP/1.1 200 OK
Date: Thu, 13 May 2010 14:00:42 GMT
Server: Apache/2.2.9
!--: spam
Vary: Accept-Encoding
Cache-Control: max-age=0
Expires: Thu, 13 May 2010 14:00:42 GMT
Set-Cookie: ref=; path=/; HttpOnly
Transfer-Encoding: chunked
Content-Type: text/html

That string it emitted by cgitb.reset(), which is trying to reset the browser 
to a sane state so the error message will be shown.  The problem can be easily 
fixed by having cgitb.reset() emit two CRLF pairs first, to ensure that we're 
done with the headers and emitting content:

-return '''!--: spam
+return '''\r\n\r\n!--: spam

--
components: Library (Lib)
messages: 105633
nosy: stutzbach
priority: normal
severity: normal
status: open
title: cgitb sends a bogus HTTP header if the app crashes before finishing 
headers
type: behavior
versions: Python 2.7, Python 3.2

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Daniel Stutzbach

Changes by Daniel Stutzbach dan...@stutzbachenterprises.com:


--
keywords: +easy

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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2010-05-13 Thread Dan Buch

Changes by Dan Buch daniel.b...@gmail.com:


--
nosy: +meatballhat

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