Fix Content-Length calculation in mhtml generation

pull/13998/head
Masterjun 6 days ago committed by GitHub
parent b7de89c910
commit ad355fdc65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -133,7 +133,7 @@ body > figure > img {
'\r\n' '\r\n'
f'--{frag_boundary}\r\n' f'--{frag_boundary}\r\n'
'Content-Type: text/html; charset=utf-8\r\n' 'Content-Type: text/html; charset=utf-8\r\n'
f'Content-Length: {len(stub)}\r\n' f'Content-Length: {len(stub.encode())}\r\n'
'\r\n' '\r\n'
f'{stub}\r\n').encode()) f'{stub}\r\n').encode())
extra_state['header_written'] = True extra_state['header_written'] = True

Loading…
Cancel
Save