cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Post File to HTTPS via cURL at command line

From: Amy Petri <Apetri_at_geneoswealth.com>
Date: Tue, 14 Jun 2005 16:08:53 -0600

Here is the data recorded from LiveHTTPHeaders. Thanks for your help.

https://www.somesite.com/template/login

POST /template/login HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/
Cookie: FDX=
Content-Type: application/x-www-form-urlencoded
Content-Length: 48
user=username&password=password&switch=Log+In
HTTP/1.x 302 Found
Date: Tue, 14 Jun 2005 21:34:38 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Set-Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==; path=/
Location: /
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/

GET / HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:34:38 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Accept-Ranges: bytes
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Features: CHPWD;RTCK;STCK;ASC
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/icons/logo.gif

GET /icons/logo.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:34:39 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Cache-Control: max-age=30000000
Expires: Sun, 28 May 2006 02:54:39 GMT
Last-Modified: Fri, 02 Jul 2004 16:14:39 GMT
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/octet-stream
----------------------------------------------------------
https://www.somesite.com/icons/dir.gif

GET /icons/dir.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:34:39 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Cache-Control: max-age=30000000
Expires: Sun, 28 May 2006 02:54:39 GMT
Last-Modified: Fri, 02 Jul 2004 16:14:39 GMT
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/octet-stream
----------------------------------------------------------
https://www.somesite.com/favicon.ico

GET /favicon.ico HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 404 Not Found
Date: Tue, 14 Jun 2005 21:34:39 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/incoming/?T

GET /incoming/?T HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:34:40 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Accept-Ranges: bytes
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Features: CHPWD;RTCK;STCK;ASC
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/icons/default.gif

GET /icons/default.gif HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/incoming/?T
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:34:41 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Cache-Control: max-age=30000000
Expires: Sun, 28 May 2006 02:54:41 GMT
Last-Modified: Fri, 02 Jul 2004 16:14:41 GMT
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/octet-stream
----------------------------------------------------------
https://www.somesite.com/favicon.ico

GET /favicon.ico HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 404 Not Found
Date: Tue, 14 Jun 2005 21:34:41 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/incoming

POST /incoming HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/incoming/?T
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==
Content-Type: multipart/form-data; boundary=---------------------------265001916915724
Content-Length: 194
-----------------------------265001916915724
Content-Disposition: form-data; name="File"; filename="test.txt"
Content-Type: text/plain

test
-----------------------------265001916915724--

HTTP/1.x 302 Found
Date: Tue, 14 Jun 2005 21:35:09 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Location: /incoming/?T
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/incoming/?T

GET /incoming/?T HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.somesite.com/incoming/?T
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 200 OK
Date: Tue, 14 Jun 2005 21:35:09 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Accept-Ranges: bytes
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Features: CHPWD;RTCK;STCK;ASC
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
https://www.somesite.com/favicon.ico

GET /favicon.ico HTTP/1.1
Host: www.somesite.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: FDX=wHHSziIjGzp5ac0vnsbG/g==

HTTP/1.x 404 Not Found
Date: Tue, 14 Jun 2005 21:35:10 GMT
Server: Apache/1.3.26 (Unix) mod_ssl/2.8.10 OpenSSL/0.9.6g SecureTransport/4.1.1
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------

  If you would give us a busload of more details of the site, the HTML and what
  the server responds (or plainly from the livehttpheader trace), we might be
  able to give you better and more accurate advice.
Received on 2005-06-15