Hongyi Zhao | 26 Apr 01:59 2015
Picon

Is it possible to download different parts of a file and put them together simultaneously?

Hi all,

I can use curl to download the different parts of a file and then
regenerate the whole file by using cat to combining them into one.

But, is it possible to download different parts of a file and put them
together simultaneously with curl?

Regards

--

-- 
Hongyi Zhao <hongyi.zhao <at> gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493
-------------------------------------------------------------------
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
Marcus Clyne | 22 Apr 18:03 2015

Questions about IMAP

Hi,

I'm trying to create an email-scraping tool using IMAP on curl.  I have 
two questions:

1) What is the request to download the headers from an email in a 
mailbox other than 'Inbox'?  The current commands I've tried are like this:

e.g. if the mailbox is [Gmail]/Inbox

curl  --request 'SELECT "[Gmail]/Important"; FETCH 1 BODY[HEADER]' --url 
'imaps://imap.gmail.com/' ...
curl  --request ' "[Gmail]/Important" FETCH 1 BODY[HEADER]' --url 
'imaps://imap.gmail.com/' ...
curl  --request "FETCH 1 BODY[HEADER] "[Gmail]/Important" ' --url 
'imaps://imap.gmail.com/' ...
curl  --request "FETCH 1 BODY[HEADER]' --url 
'imaps://imap.gmail.com/[Gmail]/Important' ...

Note: I can SELECT the mailbox, and there are 3 emails listed in it.

2) What is the request for downloading a list of attachments for an email?

3) What is the request for downloading a specific email attachment for 
an email?

Thanks for any help with any of these.

Marcus.
-------------------------------------------------------------------
(Continue reading)

Alexander.Elgert | 22 Apr 11:16 2015

AW: 7.42 compile problems

Hello,

there is another comment, after deleting all of these comments, the build works fine.
I tried one of the failing comments in a c file and compiled it - this works without making such problems.

../src/tool_formparse.c:112:30: warning: comma without following space
  * 'name= <at> filename,filename2,filename3'
                              ^
../src/tool_formparse.c:120:45: warning: comma without following space
  * 'name= <at> filename;type=image/gif,filename2,filename3'
                                             ^
checksrc: 0 errors and 2 warnings
Makefile:2220: recipe for target 'checksrc' failed
gmake[2]: *** [checksrc] Error 5
gmake[2]: Leaving directory '/ae_devel10/curl-7.42.0/src'
Makefile:637: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/ae_devel10/curl-7.42.0/src'
Makefile:851: recipe for target 'all-recursive' failed
gmake: *** [all-recursive] Error 1

Regards,
Alexander

--

-- 
Deutsche Telekom AG
Seamless ICT Security Infrastructure & Management im Auftrag T-Systems International GmbH
Dipl. Inf Alexander Elgert Langwadener Strasse 17 64625 Bensheim
+49 176 22 717 661 (Mobil)
+49 671 9683-12 (Tel)
(Continue reading)

Gaston Gloesener | 22 Apr 10:29 2015
Picon

Feature request: alternate server name/address

Today many hosters, especially when using shared servers, do now allow to upload certificates to the users site. This leads to certificate errors if one uses curl to upload the site using SSL as the certificate does not match the actual site server name found in the URL.

 

curl: (51) SSL: no alternative certificate subject name matches target host name ‘xxxx’

 

I hope I did not miss something, but as far as I know, currently the only way to get around this is to use the –insecure option. I would like to make a proposal for an alternate method which would increase the security of such connections:

 

Assume that the a user with “mydomain.net” is hosting his site at “hoster.com” on a share server. Most likely when the user tries to upload to “somesite.mydomain.com” he will get the above error because the hoster uses a certificate for “*.hoster.com” which does not mydomain.net .

 

Since the hoster.com certificate still is signed by a trusted CA it would be better to validate that certificate instead of ignoring the certificate completely. My suggestion would be to have an option like:

 

curl … --alternate-server-name mydomain.hoster.com  https://somesite.mydomain.net/   # --alternate-server-name is an example, there might be better alternative names for the option

 

This would check the proposed certificate against somesite.mydomain.net as well as against mydomain.hoster.com. The later would match the certificate example above and be accepted. Any non matching certificate will again lead to the error. In this example “mydomain.hoster.com” could of course be anything matching “*.hoster.com” like www.hoster.com . The same should work with an IP address provided the certificate presents one

 

 

 

 

 

 

 

-------------------------------------------------------------------
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
Shashank Mishra | 19 Apr 22:03 2015
Picon

Can curl add non standard port for Kerberos calls

I have a Kerberized web service (.NET) running with an identity to which SPN is registered as HTTP/abcxyzpqr.com:1234.

The web service URL is http://abcxyzpqr.com:1234/myservice/ (abcxyzpqr.com is the A type DNS record).

So now while trying to access it from curl with command curl --negotiate -u : http://abcxyzpqr.com:1234/myservice/, curl is querying the KDC for ticket with SPN - HTTP/abcxyzpqr.com.

It is not considering the non standard port. So is there a way we can make curl  to consider the non standard port also while querying the KDC for ticket. 
-------------------------------------------------------------------
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
Rodrigo Zanatta Silva | 14 Apr 15:25 2015
Picon

Complex URLs at once can't save file name

HI all...

I am using the bash cURL and I am having problem. 

I want to download various complex URLs at once, but I am having problem with name. My command is something like:

curl --url 'http://www.google.com/{various,complex,names}' --output 'name#1.html'

The problem is I can't save the file name with the various complex name I send. So the program fail to write. 

Maybe I was be happy with:

--output 'name%i.html'

So I will create files:

name1.html
name2.html
...

How can I solve this problem?
-------------------------------------------------------------------
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
Ingimar | 13 Apr 23:46 2015
Picon

posting a JSON-list, syntax ?

Hello,

I am posting a json to a java-backen. I am using Wildfly version 8.2
This works fine.
My method is decorated with the following annotation :
<at> Consumes(MediaType.APPLICATION_JSON)
<at> Produces(MediaType.APPLICATION_JSON)

Now I would like to replace a String with a List of Strings.
Having problem with the syntax

My example looks like this right now :

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"owner":"malcolm","access":"public","licenseType":"CC BY","legend":"this is peter","fileName":"tosh.jpg","tags":"view=left&music=reggea"}' http://127.0.0.1:8080/service/media

I want to change "tags":"view=left&music=reggea"  to the below ( the idea is "key":"value" )

And do the below ( inspiration from https://jersey.java.net/documentation/1.18/json.html )
I do not reach wildfly, the log is quiet

curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"owner":"malcolm","access":"public","licenseType":"CC BY","legend":"this is peter","fileName":"tosh.jpg","tags":[{"view":"left","music":"reggea"}] }' http://127.0.0.1:8080/service/media

I do not get in touch with my service , this is the reply 
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST /service/media HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: application/json
> Content-type: application/json
> Content-Length: 149
* upload completely sent off: 149 out of 149 bytes
< HTTP/1.1 400 Bad Request
< Connection: keep-alive
< X-Powered-By: Undertow/1
* Server WildFly/8 is not blacklisted
< Server: WildFly/8
< Content-Type: application/json
< Content-Length: 0
< Date: Mon, 13 Apr 2015 23:39:07 GMT
* Connection #0 to host 127.0.0.1 left intact

any ideas ?

Regardds, i
-------------------------------------------------------------------
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
Hongyi Zhao | 11 Apr 01:28 2015
Picon

Finding specific files/directories from a remote http/ftp server with curl.

Hi all,

Suppose I have some remote http/ftp servers, named as follows:

ftp://ftp.example.net.
http://www.example.com.

And I want to finding some specific files/directories from these sites with curl.

To do this, I must let my local curl client to do a traversing among all of the corresponding sub-directories for searching.  Say, if I want to find all of the `foo/file' on these servers, i.e., a file named file
which is located under the foo directory.  How can I do this thing within bash/shell script with the invoking on curl?

Regards
--
Hongyi Zhao <hongyi.zhao <at> gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493
-------------------------------------------------------------------
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
Hongyi Zhao | 9 Apr 15:49 2015
Picon

Cann't use the `--dns-servers' option with curl.

Hi all,

I use the curl 7.42.0-DEV compiled based on its git source on my Debian Wheezy.

When I use the `--dns-servers' option with curl, I meet the errors like this:

werner <at> debian:~$ curl --dns-servers 8.8.8.8 http://www.debian.org
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.

Any hints to solve this issue?

Regards
--
Hongyi Zhao <hongyi.zhao <at> gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493
-------------------------------------------------------------------
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
Leon Proskurov | 8 Apr 14:03 2015
Picon

CURL HTTP2.0

Hello cURL community,

I am a simple cURL user. I am using the command line in windows 7 to run cURL commands.
I can't execute cURL with --http2 flag.
I have downloaded the curl-7.41.0.zip file and extracted the files (curl.exe, libssh2.dll)

curl.exe -V:
curl 7.41.0 (i386-pc-win32) libcurl/7.41.0 OpenSSL/1.0.1j zlib/1.2.8 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM SSL libz

when i try to run the HTTP2 type of flow, the cURL return me an error of:
curl.exe -G --http2 http://www.cnn.com
curl: (1) Unsupported protocol

Please advice what am i missing?
p.s. i can see in the supported protocols that http2 is absent

Regards,
Leon
-------------------------------------------------------------------
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
Osipov, Michael | 8 Apr 12:03 2015
Picon

Using LDAP with cURL give error 48

Hi folks,

I am trying to retrieve some attributes from our directory server but fail to do so.
I have successfully configured and compiled:

./configure --prefix=$HOME/curl-7.41.0 --with-gssapi=/usr/local --with-zlib \
 --disable-ftp --disable-rtsp --disable-dict --disable-pop3 --disable-gopher \
 --disable-imap --disable-tftp --disable-telnet --disable-ntlm-wb --disable-ssh \
 --disable-ldaps --enable-ldap

configure: Configured to build curl/libcurl:

  curl version:     7.41.0
  Host setup:       i386-unknown-freebsd9.3
  Install prefix:   /net/home/osipovmi/curl-7.41.0
  Compiler:         gcc
  SSL support:      enabled (OpenSSL)
  SSH support:      enabled (libSSH2)
  zlib support:     enabled
  GSS-API support:  enabled (MIT Kerberos/Heimdal)
  TLS-SRP support:  enabled
  resolver:         default (--enable-ares / --enable-threaded-resolver)
  IPv6 support:     no      (--enable-ipv6)
  Unix sockets support: enabled
  IDN support:      enabled
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   /etc/ssl/cert.pem
  ca cert path:     no
  LDAP support:     enabled (OpenLDAP)
  LDAPS support:    no      (--enable-ldaps)
  RTSP support:     no      (--enable-rtsp)
  RTMP support:     no      (--with-librtmp)
  metalink support: no      (--with-libmetalink)
  HTTP2 support:    disabled (--with-nghttp2)
  Protocols:        FILE HTTP HTTPS LDAP SCP SFTP SMB SMBS SMTP SMTPS

$ ./curl --version
curl 7.41.0 (i386-unknown-freebsd9.3) libcurl/7.41.0 OpenSSL/1.0.2a zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets

Strage, ldap is not listed. It is listed here though:

n$ ./curl-config --protocols
FILE
HTTP
HTTPS
LDAP
SCP
SFTP
SMB
SMBS
SMTP
SMTPS

Linkage:
$ ldd ./curl
./curl:
        libcurl.so.7 => /usr/local/lib/libcurl.so.7 (0x28098000)
        libidn.so.11 => /usr/local/lib/libidn.so.11 (0x280f5000)
        libssh2.so.1 => /usr/local/lib/libssh2.so.1 (0x28126000)
        libssl.so.8 => /usr/local/lib/libssl.so.8 (0x2814b000)
        libcrypto.so.8 => /usr/local/lib/libcrypto.so.8 (0x281ad000)
        libgssapi_krb5.so => /usr/local/lib/libgssapi_krb5.so (0x28347000)
        libkrb5.so => /usr/local/lib/libkrb5.so (0x28388000)
        libk5crypto.so => /usr/local/lib/libk5crypto.so (0x28446000)
        libcom_err.so => /usr/local/lib/libcom_err.so (0x28476000)
        libldap-2.4.so.2 => /usr/local/lib/libldap-2.4.so.2 (0x28479000)
        libz.so.6 => /lib/libz.so.6 (0x284ba000)
        libc.so.7 => /lib/libc.so.7 (0x284ce000)
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x28603000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x2860d000)
        libthr.so.3 => /lib/libthr.so.3 (0x28705000)
        libkrb5support.so => /usr/local/lib/libkrb5support.so (0x28726000)
        liblber-2.4.so.2 => /usr/local/lib/liblber-2.4.so.2 (0x28730000)
        libsasl2.so.3 => /usr/local/lib/libsasl2.so.3 (0x2873c000)

Now let's call cURL:
$ ./curl  'ldap://host.company.net'
curl: (48) An unknown option was passed in to libcurl

Any ideas?

The very same request works flawlessly with ldapsearch but I'd like to stay with curl because we use it
already for HTTP and SMTP.

Thanks,

Michael

-------------------------------------------------------------------
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