Alexander Henket | 27 Feb 22:51 2015
Picon
Picon

Redirect from POST to GET

Hi,

OSX 10.10, curl 7.37.1

When I receive an HTTP 302 or 303 after a POST, curl detects that and actually says it's going from POST to GET, but subsequently does a POST anyway. This post (http://curl.haxx.se/mail/archive-2001-01/0115.html) from 2001 says curl should be good, but isn't currently, or so it seems.

What am I missing, or is this a bug in curl? Below what happens after a 303.

Thanks

Alexander Henket

< HTTP/1.1 303 See Other
< Date: Fri, 27 Feb 2015 21:35:43 GMT
< X-XQuery-Cached: true
< Last-Modified: 2015-02-27T22:35:44.659+01:00
< Location: <snip>
< X-Response-Format: application/xml+fhir
< Content-Type: application/xml; charset=UTF-8
< Transfer-Encoding: chunked
* Server Jetty(8.1.9.v20130131) is not blacklisted
< Server: Jetty(8.1.9.v20130131)
* HTTP error before end of send, stop sending
* Closing connection 0
* Issue another request to this URL: '<snip>'
* Disables POST, goes with GET
* Hostname was found in DNS cache
*   Trying ::1...
* Connected to localhost (::1) port 8877 (#1)
> POST <snip> HTTP/1.1
> User-Agent: curl/7.37.1


-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Andreas Gapel | 27 Feb 14:18 2015
Picon
Picon

Authentication issues with ftp proxy

Hi there,
 
I am trying to connect to an ftp server via ftp proxy. It works fine without authenication, but I just cannot figure out the right way when the proxy requires authentication.
 
The authentication is of the form user <at> host. Here is the filezilla authentication order: 
 
USER %s
PASS %w
USER %u <at> %h
PASS %p
ACCT %a
 
I know that curl does not support ftp proxies and that the proxy credentials have to be somehow provided with the username. That part works, but I don't know where to put the ftp credentials.
 
Here is what I've tried: 
 
curl -u proxyuser <at> ftpserver:proxypw -O ftp://proxyaddress:proxyport/url
curl -u proxyuser <at> ftpserver:proxypw --ftp-account ftpuser:ftppw -O ftp://proxyaddress:proxyport/url
 
Login into the proxy is successful, but afterwards when the ftp credentials have to be provided, the command returns an error.
 
Found a similar problem here: http://curl.haxx.se/mail/archive-2011-04/0012.html, but the solution does not work for me.
 
Andreas
 
 
 
 
 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Jean-Baptiste Gardette | 23 Feb 13:30 2015
Picon

smb : Couldn't connect to server

Hello

I use curl 7.40 on windows 7

I want to upload  a file to a server Samba (slackware), I use this command :
curl -T essai.txt -u "user:passwd" smb://192.168.x.x/home/share

who return :
curl : (7) Couldn't connect to server

with verbose option :
Trying 192.168.x.x...
Connected to 192.168.x.x (192.168.x.x) port 445 (#0)
Closing connection 0
curl : (7) Couldn't connect to server

What can be the reasons ?

Thank
Jean-Baptiste

---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
http://www.avast.com

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
anitha achar via curl-users | 23 Feb 07:57 2015
Picon

libcurl error:28 while using SFTP with ubuntu machine

Hi,
 While trying to get files using libcurl SFTP from a ubuntu machine, libcurl error: 28 is thrown.

 
 libcurl version 7.28 is used.

Are there any known issues with this version of libcurl on servers using ubuntu OS?

Thanks and regards,
Anitha

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Jonathan C. | 20 Feb 21:08 2015
Picon

Digest auth failing on Windows

Hi everyone, my issue is that digest auth is failing on Windows, but working on Debian.

Versions being used:
Windows:
Curl 7.40.0-DEV (i386-pc-win32) libcurl/7.40.0-DEV OpenSSL/1.0.1l zlib/1.2.8 libssh2/1.4.3_DEV
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz

Debian:
curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1e zlib/1.2.7 libidn/1.25
libssh2/1.4.3 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp
smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API SPNEGO NTLM NTLM_WB SSL libz TLS-SRP

Requests:

Debian
B$ curl --user user:pass --digest -v 10.0.2.2:3000
* Rebuilt URL to: 10.0.2.2:3000/
* Hostname was NOT found in DNS cache
*   Trying 10.0.2.2...
* Connected to 10.0.2.2 (10.0.2.2) port 3000 (#0)
* Server auth using Digest with user 'user'
> GET / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: 10.0.2.2:3000
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< X-Powered-By: Express
< Content-Type: text/plain
< WWW-Authenticate: Digest realm="digest", qop="auth",
nonce="2982cd8638875d27e409f99364b81c73", algorithm="MD5", stale="false"
< Date: Fri, 20 Feb 2015 20:04:56 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Ignoring the response-body
* Connection #0 to host 10.0.2.2 left intact
* Issue another request to this URL: 'HTTP://10.0.2.2:3000/'
* Found bundle for host 10.0.2.2: 0x7fbbe29a53f0
* Re-using existing connection! (#0) with host 10.0.2.2
* Connected to 10.0.2.2 (10.0.2.2) port 3000 (#0)
* Server auth using Digest with user 'user'
> GET / HTTP/1.1
> Authorization: Digest username="user", realm="digest",
nonce="2982cd8638875d27e409f99364b81c73", uri="/",
cnonce="ZTdhMTdlZjE5MzVmZjRkNTY2MTIxMGY4ZWRhNDk5NDM=", nc=00000001, qop=auth,
response="1be127622de8eae8b42f8b4b39ab5405", algorithm="MD5"
> User-Agent: curl/7.38.0
> Host: 10.0.2.2:3000
> Accept: */*
>
< HTTP/1.1 200 OK
< X-Powered-By: Express
< content-type: text/html; charset=utf-8
< content-length: 4
< etag: "-1919691191"
< Date: Fri, 20 Feb 2015 20:04:56 GMT
< Connection: keep-alive
<
* Connection #0 to host 10.0.2.2 left intact
hello!

Windows
.\curl.x86.exe --digest --user "user:pass" 127.0.0.1:3000 -v
* Rebuilt URL to: 127.0.0.1:3000/
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
* Server auth using Digest with user 'user'
> GET / HTTP/1.1
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:3000
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< X-Powered-By: Express
< Content-Type: text/plain
< WWW-Authenticate: Digest realm="digest", qop="auth",
nonce="5bbc5b7026f47059825d4b524b5128a4", algorithm="MD5", stale="false"
< Date: Fri, 20 Feb 2015 20:05:39 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Ignoring the response-body
* Connection #0 to host 127.0.0.1 left intact
* Issue another request to this URL: 'HTTP://127.0.0.1:3000/'
* Found bundle for host 127.0.0.1: 0x5683a0
* Re-using existing connection! (#0) with host 127.0.0.1
* Connected to 127.0.0.1 (127.0.0.1) port 3000 (#0)
* Server auth using Digest with user 'user'
> GET / HTTP/1.1
> Authorization: Digest username="user",realm="",nonce="5bbc5b7026f47059825d4b524b5128a4",uri="/",cnonce="eb09b3066849fcfdf008f2a41df2e186",nc=00000001,algorithm=MD5,response="7c7f4f0ae49d937f6e1f68eea8ece33f",qop="auth"
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:3000
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< X-Powered-By: Express
< Content-Type: text/plain
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest realm="digest", qop="auth",
nonce="f4520c220a10f5fab2ea2d2c065aaa16", algorithm="MD5", stale="false"
< Date: Fri, 20 Feb 2015 20:05:39 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
401 Unauthorized* Connection #0 to host 127.0.0.1 left intact

The only thing strange for me is that the realm is not set on Windows, why it's not being set?

(the same issue is reproducible while using libcurl directly)
 		 	   		  
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Andrew Pennebaker | 15 Feb 04:33 2015
Picon

Support for HDFS:// URLs

Could we add support for downloading HDFS:// files with curl?

As a workaround, users can identify a special HTTP:// URL that points to the WebHDFS location, but I'd prefer that curl learn how to do this automatically on behalf of the user.

Cheers,
Andrew Pennebaker
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Raphael Bauduin | 13 Feb 12:04 2015
Picon

list of http headers to be sent

Hi,

is there a way to get to the list of headers that will be sent by curl for an http query?
additionaly could they be modified just before the query is sent out?

Eg, if no Accept heder is set, libcurl will add one. Same for a Host: header.
As I need to know exactly what headers are sent, I set them myself, but might be easier to get them from curl directly.

Thanks

Raph

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Giga Gigosu | 12 Feb 16:20 2015
Picon

curl issues with Microsoft IIS FTP server?

Hi all,

i’m currently running into some issues with multiple FTP clients (running MacOS 10.8.5) when uploading to a certain FTP server running Windows 2012 R2. Same curl command uploads always fine to other FTP servers but has troubles at times with this Windows FTP server.

On client side, this is curl version
    curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz

On server side, we have Microsoft IIS server

Clients connect to FTP server and try to upload files via a scripted process. Almost all uploads are successful but on random occasions (let’s say about 1 in 50) the FTP upload process stalls and produces error 25 FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.

here's the curl command being used:
   /usr/bin/curl -T "$source_folder"/"$PDF" ftp://"$FTP_username":"$FTP_password" <at> "$FTP_server"/"$FTP_folder"/ --retry 6 --disable-epsv --ftp-create-dirs --max-time 600

When this error happens, curl stalls and waits forever. By using --max-time option FTP session gets closed and upload will be successful on next retry.

We couldn’t find any issues on server side so i was wondering if this is a know issue between this curl version and Microsoft IIS 2012 R2 FTP server.

I appreciate your input,
Giga
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Jerry OELoo | 10 Feb 08:34 2015
Picon

How to compile curl with openssl 1.0.2

Hi All:
I download curl7.40 source code, and I have already compile openssl
1.0.2 source code, Now I want to compile curl with openssl 1.0.2.

./configure --prefix=/usr/local/curl-7.40.0 --with-ssl
--with-libssl-prefix=/usr/local/openssl-1.0.2

make && make install

After I install, I ldd curl library but still link with system default library.

ldd libcurl.so
linux-vdso.so.1 =>  (0x00007fff2db2e000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007fafb9b6e000)
librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007fafb9954000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fafb96f5000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x00007fafb931b000)

--

-- 
Rejoice,I Desire!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Hector Chan | 7 Feb 20:48 2015
Picon

curl with transparent proxy for SSL requests

Hi all,

How does curl behave if there is a transparent proxy in the middle between the client machine where curl is run and the destination server for a HTTPS request ?

Let's say I am sending the following HTTPS request to google.com:

    curl -v https://www.google.com

Without the -k/--insecure option, if the transparent proxy does not decrypt SSL traffic, is curl going to reject the request ?

Now, what if the transparent proxy is decrypting SSL traffic and putting its own SSL certificate in the chain.   Without the -k/--insecure option, is curl going to reject the request if the transparent proxy SSL certificate is self-signed, and the SSL certificate is not imported to the client machine?

Does it matter in the above situations if curl uses SSLv3 vs. TLSv1 ?

My belief is curl should allow the request to go through if the transparent proxy does not decrypt SSL traffic, and curl should reject the request if the transparent proxy does decrypt it.  Unfortunately, I don't have a transparent proxy setup, and this problem only occurs in our customer's environment.

I am running a rather old version of curl, but for some other reasons we are not able to upgrade.

# curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.1 Basic ECC zlib/1.2.3 c-ares/1.7.0 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

Thanks.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Daniel Stenberg | 6 Feb 09:26 2015
Picon

stickers and/or tshirts?

Hey all,

The topic of making some curl stickers came up the other today (when someone 
mentioned I have no such thing on my laptop). I've considered tshirts too in 
the past and I have an old an tshirt-sponsorship offer (possibly no longer 
valid).

If you have designs (or at least ideas) for stickers and tshirts, I'm 
interested. Post them here or anywhere that reaches me and I'll try to get the 
ball rolling.

The existing logo is available in several formats here:

 	http://curl.haxx.se/logo/

Whoever brings a "winning" design certainly will be given a few end products.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Gmane