mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
httpd: answer /cmd with the shared text header
The /cmd path carried its own copy of the plain-text response header, which was the same string page_impl.c already keeps in HTTP_RESPONCE_TXT, minus one difference: the shared one never said Connection: close. This httpd closes after every response, so a reply that does not advertise it invites the browser to reuse the socket and lose the next request. HTTP_RESPONCE_JSON has always said so; the text one was the odd one out, and send_config() and send_cmd_log() were answering without it. The copy is gone and the shared string carries the header. The check for a command that printed nothing now compares against the length strtox() returned instead of sizeof() on the macro.
This commit is contained in:
1 parent
a259587bf9
commit
b57b7d1a3d
3 files changed
+7
-8
No files matched your search
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
extern __code uint8_t * __code HTTP_RESPONCE_TXT;
|
||||
|
||||
bool send_counters(uint8_t phys_port);
|
||||
void send_status(void);
|
||||
void send_vlan(uint16_t vlan);
|
||||
|
||||
Reference in new issue
Block a user