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 won't take large things. Or something... #26

kyleterry opened this issue Feb 21, 2014 · 3 comments

Server won't take large things. Or something... #26

kyleterry opened this issue Feb 21, 2014 · 3 comments


Copy link

@kyleterry kyleterry commented Feb 21, 2014

$ curl -v -X POST -d @test_file.txt http://localhost:8080/turtles/test_book
* Hostname was NOT found in DNS cache
*   Trying ::1...
* connect to ::1 port 8080 failed: Connection refused
*   Trying
* Connected to localhost ( port 8080 (#0)
> POST /turtles/test_book HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:8080
> Accept: */*
> Content-Length: 1215848
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
< HTTP/1.1 404 Not Found
< Status: 404 Not Found
* Server OlegDB/fresh_cuts_n_jams is not blacklisted
< Server: OlegDB/fresh_cuts_n_jams
< Content-Length: 26
< Connection: close
< Content-Type: text/plain
These aren't your ghosts.
* Closing connection 0
Copy link

@qpfiffer qpfiffer commented Feb 21, 2014

Curl send an "Expect: 100-continue" header, and then waits. After this it sends the data if the server responds with HTTP/1.1 100 Continue. This data is sent without the header.

I'll have to parse out the header first, note that the client is expecting a 100 back, and then branch to a different function to load in the actual data. Should be doable without too much trouble.

Copy link

@qpfiffer qpfiffer commented Feb 23, 2014

Alright now it'll accept data but somewhere along the line it is being truncated.

@qpfiffer qpfiffer closed this in 9d1f1c1 Feb 28, 2014
Copy link

@qpfiffer qpfiffer commented Feb 28, 2014

So curl doesn't like big binary files being shoved through it. I added a helper script to do this sort of thing that just uses requests, you'll find it in integrity_tests/ Example usage:

./ 1391991186839.jpg image/jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.