stash
This commit is contained in:
parent
be01d6b985
commit
9de089083c
8 changed files with 191 additions and 144 deletions
|
|
@ -78,12 +78,14 @@ for file in httpFiles:
|
|||
else:
|
||||
response = b'HTTP/1.0 200 OK\r\n'
|
||||
response += b"lwIP/1.4.1 (http://savannah.nongnu.org/projects/lwip)\r\n"
|
||||
#fext = file.split('.')[-1]
|
||||
response += b'Content-type: ' + mimeType.encode() + b'\r\n'
|
||||
|
||||
binFile = open(file, 'rb')
|
||||
binData = binFile.read()
|
||||
compEff = False
|
||||
if args.minify:
|
||||
# shell: binData | minify --html-keep-document-tags --mime text/html | minData
|
||||
p = subprocess.Popen(["minify", "--html-keep-document-tags", "--mime", mimeType], stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
minData = p.communicate(binData)[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue