Welcome! Log In Create A New Profile

Advanced

Re: Max file size which can be transferred

Maxim Dounin
August 01, 2013 05:58AM
Hello!

On Thu, Aug 01, 2013 at 03:20:28AM -0400, Rakshith wrote:

> Hi,
>
> I wanted to know whats the maximum file size which i can transfer using a
> simple CURL PUT/GET command. I ask this because when i try to send a file
> which is >64KB, i get a HTTP/1.1 100 Continue message:
>
> File i am trying to do a PUT:
>
> [rakshith~]$ ls -l nginx.tar
> -rw-r--r-- 1 rakshith engr 675840 Jul 29 14:38 nginx.tar
>
> [rakshith~]$ curl -X PUT -d @nginx.tar -o /dev/null -qvk
> http://x.x.x.x:80/Enginex.tar
> * About to connect() to x.x.x.x port 80
> * Trying x.x.x.x... connected
> * Connected to x.x.x.x (x.x.x.x) port 80
> > PUT /Enginex.tar HTTP/1.1
> > User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5
> OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> > Host: x.x.x.x
> > Accept: */*
> > Content-Length: 64982

Please note: length of a document curl tries to PUT is just 64982.

> > Content-Type: application/x-www-form-urlencoded
> > Expect: 100-continue
> >
> < HTTP/1.1 100 Continue
> < Server: nginx/1.5.3

Just a side note: "HTTP/1.1 201 Created" line is missed here.
It's likely a problem of verbose output in the old version of curl
you are using. Recent versions of curl correctly show it like this:

< HTTP/1.1 100 Continue
} [data not shown]
< HTTP/1.1 201 Created
< Server: nginx/1.5.4
....

> < Date: Thu, 01 Aug 2013 06:05:15 GMT
> < Content-Length: 0
> < Location: http://x.x.x.x/Enginex.tar
> < Connection: keep-alive
> 100 64982 0 0 100 64982 0 5133k --:--:-- --:--:-- --:--:--
> 9065k* Connection #0 to host x.x.x.x left intact
>
> Now the actual contents which made it through is of size close to 64KB and
> not 647KB
>
> bash-3.2# ls -l Enginex.tar
> -rw------- 1 nobody nobody 64982 Aug 1 06:05 Enginex.tar

.... and the file created is exactly as PUT by curl. That is,
there is no problem in nginx.

Using "curl --data-binary @..." instead of "curl -d ..." should
help.

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Max file size which can be transferred

Rakshith August 01, 2013 03:20AM

Re: Max file size which can be transferred

Maxim Dounin August 01, 2013 05:58AM

Re: Max file size which can be transferred

Rakshith August 01, 2013 06:03AM

Re: Max file size which can be transferred

Rakshith August 01, 2013 06:11AM

Re: Max file size which can be transferred

Maxim Dounin August 01, 2013 07:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 267
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready