-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two small problems that need to be solved. #1
Comments
Sorry for problems in my code. |
Here's my code, by replace this line. client.send(f"HTTP/1.1 200 OK\r\nContent-Type: application/octet-stream\r\nContent-Disposition: attachment; filename=\"{file_name}\"\r\nContent-Length: {os.stat(file_path)[6]}\r\n\r\n") |
After two days of debugging, there is still no way to add the binary file to the firmware, I can only use the most common method, which is to use three quotes to save the web page and other files as python files, compile the firmware and then decompress the web page file, in order to reduce the file size so the
.js
and.css
file is compressed, the first problem was found in debugging, this line is missing a semicolon, which will lead to abnormal operation after compression.Another problem appeared here, when using download software (I'm using NDM) to download the file will always fails, after analysis, found that the http response header is missing the
Content-Length
field, after adding can solve this problem.I've already forked this repo, but I think it would be more convenient to leave an issue directly rather than submitting a pr?
The text was updated successfully, but these errors were encountered: