GzipSimpleHTTPServer icon indicating copy to clipboard operation
GzipSimpleHTTPServer copied to clipboard

Cant change parameters if imported.

Open ksmith97 opened this issue 9 years ago • 1 comments

Currently when run from the command line you can change the port and the encoding type. However, the variables are set as globals within the file instead of as class arguments. Given the HTTPServer takes a class as an argument and not an instance, I am not entirely certain how to modify the code to paramaterize the class in a way that would still make it usable with the BaseHTTPServer. The end result of this is that you are unable to modify the port and encoding used if you import the class. I am not normally a Python dev so I am not sure of an appropriate response to this issue.

ksmith97 avatar Feb 05 '17 21:02 ksmith97

I debated adding optional constructor params but it still has the issue of setting globals.

ksmith97 avatar Feb 05 '17 21:02 ksmith97