nodemcu-httpserver icon indicating copy to clipboard operation
nodemcu-httpserver copied to clipboard

Lua Panic on uri.file length > 27

Open jrandombob opened this issue 9 years ago • 2 comments

In spite of what the nodemcu doco says, it appears that filenames > 27 characters (not 32) cause file.open to throw a panic.

Utterly knucklehead patch attached; httpserver.lua.patch.txt

jrandombob avatar Oct 19 '16 21:10 jrandombob

The docs to my knowledge don't say but it's 31 chars, not 32. See https://github.com/nodemcu/nodemcu-firmware/pull/1114 for details.

31 - ".lua".len() = 27?

marcelstoer avatar Nov 11 '16 20:11 marcelstoer

No, these files didn't have extensions.

The filenames were truncated MD5 hashes under the http/ pseudo directory.

e.g. http/5f4dcc3b5aa765d61d8327 (27 chars) worked but http/5f4dcc3b5aa765d61d8327d (28 chars) caused a panic.

jrandombob avatar Nov 12 '16 23:11 jrandombob