Hi, 
finally, i made it. 
I suggest a couple of modifications in httpd.c to get the things work.
This one tells httpd to make a copy of each allocated buffer when calling 
tcp_write.

#define HTTP_IS_DATA_VOLATILE(hs)   ((hs)->ssi ? TCP_WRITE_FLAG_COPY : 
hs->file->is_custom_file)

The next one fixes a (possible) bug in http_init_file function
If the file is a custom file, we have to tell httpd that the file buffer still 
has to be filled, so we myst set:
hs->left = 0 
instead of 
hs->left = file->len


     hs->handle = file;
     hs->file = (char*)file->data;
     LWIP_ASSERT("File length must be positive!", (file->len >= 0));
-    hs->left = file->len;
+       if (file->is_custom_file == 0)
+        hs->left = file->len;
+       else 
+        hs->left = 0;
     hs->retries = 0;




_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to