[307] Temporary Redirect
dejanristic78 opened this issue · 1 comments
I'm playing around with MicroWebSrv2 on an esp32.
The following demo features are working just fine:
*Test a POST form
*Test the WebSockets page
*Test the multi-user chat page
But these links doesn't work and generates a "[307] Temporary Redirect" debug message:
*Test a redirection
*Test a pyhtml template page
*View a PDF file
Also, whenever "favicon.ico" is requested i get the same debug message:
MWS2-DEBUG> From 192.168.0.14:58705 GET /favicon.ico >> [307] Temporary Redirect
What could be the reason for this?
I also received a [307] Temporary Redirect error and was able to solve the problem as follows:
Cause of [307] Temporary Redirect error:
I had the problem that files like .ico, .png and .pdf are excluded from uploading with Pymark. So they were not present in the file system of the microcontroller and could not be found, which then led to the [307] Temporary Redirect error.
Solution:
The files that are to be taken into account during upload must be explicitly specified in the project settings of Pymark.
In my case I had to add the following line, then everything worked fine:
"sync_file_types": "py,txt,log,json,xml,html,js,css,mpy,pdf,ico,png,svg"
Information about the microcontroller:
Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28; FiPy with ESP32