Http post file (multipart).

snahmad75
Posts: 170
Joined: Wed Jan 24, 2018 6:32 pm

Http post file (multipart).

Postby snahmad75 » Wed Jun 13, 2018 11:25 am

Hi,
Http post file (multi part) is not implemented.

HttpServer class does not support file post.

Have any one implement its own.

class MyMultiPart is commented out in https://github.com/nkolban/ESP32_Explorer


Thanks,
Naeem

snahmad75
Posts: 170
Joined: Wed Jan 24, 2018 6:32 pm

Re: Http post file (multipart).

Postby snahmad75 » Thu Jun 14, 2018 10:39 am

Sending large file cause stack overflow. I guess HttpServer does not handle multi-part.

D (1451808) HttpServerTask: HttpServer that was listening on port 80 has received a new client connection; sockFd=4098
D (1451819) HttpParser: >> parse: socket: fd: 4098
D (1451825) HttpParser: >> parseRequestLine: "POST /upload_file HTTP/1.1" [26]
D (1451831) HttpParser: << parseRequestLine: method: POST, url: /upload_file, version: HTTP/1.1
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (HttpServerTask)

Backtrace: 0x4000c350:0x3ffcf300 0x401436ab:0x3ffcf310 0x4013d2f9:0x3ffcf330 0x4013db3d:0x3ffcf3b0 0x4013dbae:0x3ffcf3e0 0x4010c753:0x3ffcf400 0x4010f9fe:0x3ffcf430 0x4010d82a:0x3ffd4080 0x40109e2a:0x3ffd4310 0x4010c2a0:0x3ffd4420
0x401436ab: pbuf_copy_partial at C:/Work/LibDev/esp32/esp-idf/components/lwip/core/pbuf.c:1247

0x4013d2f9: lwip_recvfrom at C:/Work/LibDev/esp32/esp-idf/components/lwip/api/sockets.c:1814

0x4013db3d: lwip_recvfrom_r at C:/Work/LibDev/esp32/esp-idf/components/lwip/api/sockets.c:1814

0x4013dbae: lwip_recv_r at C:/Work/LibDev/esp32/esp-idf/components/lwip/api/sockets.c:1814

0x4010c753: Socket::receive(unsigned char*, unsigned int, bool) at C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/Socket.cpp:245

0x4010f9fe: HttpParser::parse(std::shared_ptr) at C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/HttpParser.cpp:219

0x4010d82a: HttpRequest::HttpRequest(std::shared_ptr) at C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/HttpRequest.cpp:98

0x40109e2a: HttpServerTask::run(void*) at C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/HttpServer.cpp:323

0x4010c2a0: Task::runTask(void*) at C:/Work/LibDev/esp32/esp-idf/components/cpp_utils/Task.cpp:59

snahmad75
Posts: 170
Joined: Wed Jan 24, 2018 6:32 pm

Re: Http post file (multipart).

Postby snahmad75 » Thu Jun 14, 2018 3:59 pm

Can any one answer this thread. I am struggling handling upload file.

Any free open source to parse multipart/form http post request and extract file content.

snahmad75
Posts: 170
Joined: Wed Jan 24, 2018 6:32 pm

Re: Http post file (multipart).

Postby snahmad75 » Mon Jun 18, 2018 9:22 pm

WebServer c++ class which is based on mongoose handle multi-part http request. it works.

I need same functionality in HttpServer class. Can any one suggest where i can get buffer with file content with multiple request.
and pass to my Multi-part parser.

Wireshark is not helping. it does not shows upload file content chunk by chunk for unsecured http.

Who is online

Users browsing this forum: No registered users and 1 guest