joswa / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

post large file( > 512KB) to cgi program will get 577 error or connect reset error #245

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. upload file with my upload.html and post to upload.cgi (source code attached)

What is the expected output? What do you see instead?
Successful message with total post data length.
Uploaded file write to /tmp/testfil.bin length 10486099

Sometimes I will get error 577 or connect reset error.

What version of the product are you using? On what operating system?
1a. using standalone mongoose or embedded static library version 2.11
1b. using standalone mongoose Revision: 7d1dd26a81be 
2. Debian testing.

Please provide any additional information below.

Original issue reported on code.google.com by kaich...@gmail.com on 30 Mar 2011 at 2:48

Attachments:

GoogleCodeExporter commented 9 years ago
It is my fault.
I should process post data more carefully.

CGI program exit too early and cause error 577 which is EPIPE(pipe broken).

Sorry for noise.

Original comment by kaich...@gmail.com on 6 Apr 2011 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by valenok on 25 Apr 2011 at 7:40

GoogleCodeExporter commented 9 years ago
I use mongoose as web server in my embedded system project and encounter this 
issue.
I workaround it by the web cgi,i get the upload file length by 
getenv("CONTENT_LENGTH") and write a loop to read all the upload file.

until now,mongoose work well.
thank you,mongoose team!

Original comment by cbdsq...@gmail.com on 11 Aug 2011 at 12:46

GoogleCodeExporter commented 9 years ago
the attached 'c' code is usable? how is reading from mongoose buffer?

can anybody share a code to read and save the uploaded(POST) file from a html 
page to the mongoose server.

Original comment by abhayad...@gmail.com on 22 Dec 2011 at 7:01

GoogleCodeExporter commented 9 years ago
mongoose also use stdin to read, so you may use stdin to read file content:
#!/bin/sh

cat <&0 > /tmp/aaa

Original comment by anton...@radinetcomm.com on 5 Jan 2012 at 6:35

GoogleCodeExporter commented 9 years ago
please provide a solution i want to generate a file and post to the server as 
html file 

Original comment by ilke...@gmail.com on 21 Dec 2012 at 12:05