Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server crashes with certain image/media payloads #46

Open
mattfeury opened this issue Sep 21, 2020 · 2 comments
Open

server crashes with certain image/media payloads #46

mattfeury opened this issue Sep 21, 2020 · 2 comments

Comments

@mattfeury
Copy link

mattfeury commented Sep 21, 2020

hi! thanks for this server. it is really impressive and helpful.

i'm trying to set it up to send some media data to a device via a POST. i'm able to make an empty file of X bytes and send it successfully:

$ mkfile -n 76369 76369.txt
$ curl -X POST -v --data-binary @76369.txt  "http://192.168.7.58:9000/"
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 192.168.7.58...
* TCP_NODELAY set
* Connected to 192.168.7.58 (192.168.7.58) port 9000 (#0)
> POST / HTTP/1.1
> Host: 192.168.7.58:9000
> User-Agent: curl/7.64.1
> Accept: */*
> Content-Length: 76369
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
> 
* Done waiting for 100-continue
* We are completely uploaded and fine
< HTTP/1.1 200 OK
< Date: Mon, 21 Sep 2020 16:53:30 GMT
< Connection: keep-alive
< Content-Type: text/plain
< Content-Length: 13
< 
* Connection #0 to host 192.168.7.58 left intact
Hello, World!* Closing connection 0

however. when i try to do this same request with a .png, .jpeg, .mkv, etc, i will often see failures. below is a file of the same size:

$ curl -X POST -v --data-binary @image.jpg  "http://192.168.7.58:9000/"
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 192.168.7.58...
* TCP_NODELAY set
* Connected to 192.168.7.58 (192.168.7.58) port 9000 (#0)
> POST / HTTP/1.1
> Host: 192.168.7.58:9000
> User-Agent: curl/7.64.1
> Accept: */*
> Content-Length: 76369
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
> 
* Done waiting for 100-continue
* We are completely uploaded and fine
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

any thoughts as to why this is happening and how i can fix? maybe a character encoding issue?

thanks!

@jeremycw
Copy link
Owner

Sorry for the late response. I'd be curious to know more but I can't reproduce the issue. Do you have a file that you wouldn't mind sharing that can reproduce the problem?

@userhdisk
Copy link

Cloud be that #53 solves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants