ProxHTTPSProxy, a Proxomitron SSL Helper Program
|
May. 20, 2010, 03:19 AM
Post: #8
|
|||
|
|||
RE: ProxHTTPSProxy, a Proxomitron SSL Helper Program
(May. 19, 2010 09:26 PM)Graycode Wrote: I think for example AJAX may allow a POST having zero content Thanks. Now it is: Code: post_data = self.rfile.read(post_data_len) if post_data_len > 0 else '' (May. 19, 2010 09:26 PM)Graycode Wrote: Python's urllib2 module handles redirections, cookies and many other things so I assume it will finally fetch the content. If not for example 304 it will raise an Exception, which will be caught in my try statement and the response code will be passed to the browser. (May. 19, 2010 09:26 PM)Graycode Wrote: Also unclear whether that's a HTTP/1.0 or 1.1 response, but maybe connection persistence is not a factor in what you're using this for. To keep things simple, I am adding "Connection: close" to each request. Code: req.add_header("Connection", "close") (May. 19, 2010 09:26 PM)Graycode Wrote: Yes, urllib2 handles chunked data but won't touch gzip, deflate etc. That's why I dropped Transfer-Encoding header while keep Content-Encoding header. (May. 19, 2010 09:26 PM)Graycode Wrote: As the statement itself explained, I get only "host_port" from "self.path". I am reading the requested path from the following http request in the SSL tunnel: Code: # Read 512 bytes to extract url path From your point of view, will it cause issue not reading all data from the socket? (May. 19, 2010 09:26 PM)Graycode Wrote: Thanks. Now I understand why sidki's config was adding 'Content-Length: 0' to my response. Where are you sidki? Come back please ... Now it is: Code: resp = ('HTTP/1.1 307 Moved Temporarily\r\n', |
|||
« Next Oldest | Next Newest »
|