[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Jordan Szubert
Jordan Szubert added the comment: #minimal server: #!/c/Python33/python.exe from http.server import HTTPServer as S, BaseHTTPRequestHandler as H class HNDL(H): def log_request(req,code): print('header is',req.headers.get('X-Forwarder-For&#

[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Jordan Szubert
Jordan Szubert added the comment: what _lowerHTTP does is try read request header 'X-Forwarded-For', but instance of request handler have attribute headers only if thing that connected to port where server listens happened to send valid enough http request my problem is, document

[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-06-16 Thread Jordan Szubert
New submission from Jordan Szubert: it seems that problem is someone connecting to port 8080 with non-http client, could not find warning in documentation ---fragment of `less access.log` 81.172.30.254 - - [16/Jun/2013 11:36:58] "^SBitTorrent protocol^@^@^@^@^@^X

[issue9668] strings in json.dump in '' instead of ""

2010-08-24 Thread Jordan Szubert
Jordan Szubert added the comment: could not reproduce: Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from cStringIO import