I have included some of the content of that file, I am writing this as an extension to my ebserver which is based on BaseHTTPServer. This part of the code was taken directly from the CGIHTTPServer file, nothing changed