snprintf in http2.c

2013-09-06 Thread Gisle Vanem
I built NgHTTP2 some days ago using MSVC 2010. I was amazed of how easy it was. Not very Unix/Posix centric at all. But using the first little merge of nghttp2 into libcurl, I stumbeled on the missing 'snprintf' in MSVCRT. Isn't this how we do it for other libcurl files? I.e. use 'curl_msnprintf'

Re: best practices: c-ares vs threaded resolver

2013-09-17 Thread Gisle Vanem
"m brandenberg" wrote: So these and other issues make me want to use the system resolver library. When it fails, there's a general system/network configuration issue that doesn't become a support issue for us. I tend to agree. The systems resolver seems alway to work best for me. At least wh

HTTP 2.0 selects forever

2013-09-25 Thread Gisle Vanem
I'm having some success with HTTP 2.0 using the NgHTTP2 test server http://106.186.112.116/ . I don't suppose there are other HTTP 2.0 servers I can test with? The problem is some extra garbage in the start and end of output. Using this command curl --http2.0 http://106.186.112.116/ Gives thi

Re: HTTP 2.0 selects forever

2013-09-26 Thread Gisle Vanem
"Daniel Stenberg" wrote: I have a few local commits that make it slightly better but recently I've hit a little obstacle in nghttp2's API that I've been communicating with Tatsuhiro about how to solve[1]. I hope to be able to get something done on that soon so that I can get a first HTTP2 dow

Re: HTTP 2.0 selects forever

2013-09-27 Thread Gisle Vanem
"Daniel Stenberg" wrote: On Thu, 26 Sep 2013, Tatsuhiro Tsujikawa wrote: But SPDY will disappear when HTTP/2.0 is standardized, so there may be less incentive to invest the time to support SPDY now, but YMMV. Exactly. SPDY was pioneered by Google and it is now being offered on many servers

errno on lwIP

2013-10-09 Thread Gisle Vanem
lib/curl_setup_once.h assumes lwIP on Windows uses 'SetLastError()' to set network errors. It doesn't; it uses 'errno'. Hence this little patch: --- g:/MingW32/src/inet/curl/Git-latest/lib/curl_setup_once.h 2013-02-23 19:58:58 + +++ g:/MingW32/src/inet/curl/lib/curl_setup_once.h 2013-

[Patch] docs/examples/httpput.c

2013-10-22 Thread Gisle Vanem
Patch docs/examples/httpput.c for MSVC since it's missing : --- Git-latest/docs/examples/httpput.c 2013-01-28 15:48:38 + +++ docs/examples/httpput.c2013-10-09 11:54:26 + @@ -22,7 +22,9 @@ #include #include #include -#include +#ifndef _MSC_VER +# include +#endif #include -

Re: Question about some platform updates to Windows

2013-10-24 Thread Gisle Vanem
"Myria" wrote: I noticed that Windows does not define HAVE_GMTIME_R or HAVE_LOCALTIME_R. It is true that Visual Studio's C runtime library doesn't have gmtime_r, but it has a somewhat-equivalent API, gmtime_s. gmtime_s's prototype is different, reversing the order of the two parameters and r

Re: [Patch] docs/examples/httpput.c

2013-10-24 Thread Gisle Vanem
"Dan Fandrich" wrote: But I'm not sure is needed at all. It's needed for close(2). But the only reason that's needed is because fstat is used instead of stat(2); if you fix that, then you could remove that include altogether. Okay. I've tested the following with MSVC and MingW. htttput.c n

Program using libcurl

2013-10-25 Thread Gisle Vanem
Something to add to http://curl.haxx.se/libcurl/using/apps.html PeerBlock [1] lets you control who your computer "talks to" on the Internet. By selecting appropriate lists of "known bad" computers, you can block communication with advertising or spyware oriented servers... The PeerBlock prog

Re: [Bulk] I want to delete file from sftp bu libcurl, but...

2013-12-11 Thread Gisle Vanem
"??" <506017...@qq.com> wrote: headerlist = curl_slist_append(headerlist, "rm abc.c"); result = curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist); Maybe the command should be "dele abc.c" under this SFTP-server. --gv -

Re: [Bulk] RE: Win32 use of GetVersionEx()

2014-01-17 Thread Gisle Vanem
"Steve Holme" wrote: Whilst this has fixed the native VC12 builds [1] I seem to have broken the mingw [2] auto builds :( I'm guessing that these builds don't pull in the same header files as native build do, so does anyone know what I need to include? For those functions to work, -D_WIN32_

Re: [Bulk] RE: [Bulk] RE: Win32 use of GetVersionEx()

2014-01-17 Thread Gisle Vanem
"Steve Holme" wrote: Cheers Gisle... Can I simply change my current pre-processor check from: #if !defined(VerifyVersionInfo) To: #if (_WIN32_WINNT < _WIN32_WINNT_WIN2K) Or do I need something a little more complicated where I check that _WIN32_WINNT and _WIN32_WINNT_WIN2K are defined as

Wrong NgHTTP2 user-data

2014-01-29 Thread Gisle Vanem
Something is wrong in 'userp' for the HTTP2 recv_callback(). The session is created using bogus user-data; '&conn' and not 'conn'. I noticed this since the socket-value in Curl_read_plain() was set to a impossible high value. A patch: --- orig/http2.c" 2014-01-29 15:19:25 + +++ http2.c

Re: Wrong NgHTTP2 user-data

2014-01-29 Thread Gisle Vanem
Something is wrong in 'userp' for the HTTP2 recv_callback(). Another patch for http2.c; the number of elements in the 'nghttp2_session_callbacks' structure is now reduced by 2 in version 0.3.0 (I'm not sure when the change happened, but checking for ver 0.3.0 work for me). The excess initial

Re: [Bulk] Re: Wrong NgHTTP2 user-data

2014-01-29 Thread Gisle Vanem
"Fabian Frank" wrote: Do we already want to introduce ifdefs for backwards compatibility at this point? HTTP2 and nghttp2 are moving so fast and nothing is finalized yet, so it might make the code easier to maintain in the long run if we just mandate an exact (or the latest) nghttp2 version un

Re: [Bulk] Re: Why syntax error in release version of code in visual c++

2014-02-06 Thread Gisle Vanem
"ansh kumar" wrote: Okay I've removed \0 from the buffer size. 1) I want to know why I'm getting following error if I use CURLOPT_INFILESIZE_LARGE option instead of CURLOPT_INFILESIZE : MAIL FROM: SIZE=141949047089924518 Did you cast the CURLOPT_INFILESIZE_LARGE argument (the file_size) to

Re: [Bulk] Re: Trying to cross compile libcurl with MinGW 32-bit from Ubuntu, for Win32 Executables

2014-02-17 Thread Gisle Vanem
wrote: ../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o -L/path/to/mingw32/lib ../lib/.libs/libcurl.a -lgdi32 -lssl -lcrypto -lwldap32 -lz -lws2_32 /path/to/mingw32/lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0x1070): undefined reference to `_imp__Crea

Re: [Bulk] Re: [Bulk] Re: Trying to cross compile libcurl with MinGW 32-bit from Ubuntu, for Win32 Executables

2014-02-18 Thread Gisle Vanem
wrote: LIBOBJS = LIBS = -lssl -lcrypto -lgdi32 -lssl -lcrypto -lwldap32 -lz -lws2_32 Why is '-lcrypto' given twice? That could be your problem. ../lib/curl-nonblock.o -L/path/to/mingw32/lib ../lib/.libs/libcurl.a -lgdi32 -lssl -lcrypto -lwldap32 -lz -lws2_32 /path/to/mingw32/lib/libcrypto

Re: [bagder/curl] 420d9f: Rework Open Watcom make files to use standard Wmak...

2014-03-03 Thread Gisle Vanem
"GitHub" wrote: Changed paths: M lib/Makefile.Watcom M src/Makefile.Watcom Log Message: --- Rework Open Watcom make files to use standard Wmake features Jiri, Daniel. Can one of you please change my email-address in those headers? To: gva...@yahoo.no. And since these files

Re: [bagder/curl] 420d9f: Rework Open Watcom make files to use standard Wmak...

2014-03-03 Thread Gisle Vanem
"Steve Holme" wrote: Would it better to change the header to our standard libcurl licence/disclaimer/header just like in makefile.vc6? I appreciate I may have just volunteered for the task if folk agree ;-) I have attached something like that. Just went through the git-history and pulled out

Re: sftp upload - curl error 79 Error in the ssh layer

2014-03-20 Thread Gisle Vanem
"Petr Ent" wrote: I assumed that since command line curl accepted target path without the filename, library would behave the same. Clearly I was wrong :). Anyway, I think something like "In upload mode, CURLOPT_URL must contain full path including filename" would help a lot. A "full target pa

[Patch] vtls/polarssl.c

2014-03-22 Thread Gisle Vanem
The debug messages printed inside PolarSSL always seems to end with a newline. So 'infof()' should not add one. Besides the trace 'line' should be 'const'. Patch: --- Git-latest/lib/vtls/polarssl.c 2014-03-19 23:24:29 + +++ lib/vtlspolarssl.c" 2014-03-22 16:09:41 + @@ -104,7 +104,7

Missing 'state.os_err'

2014-03-27 Thread Gisle Vanem
I note that 'data->state.os_errno' is not set in many places. Only some places around send(), bind() etc. What if 'curl_easy_getinfo (..CURLINFO_OS_ERRNO..)' is called to retrieve the OS-error when thing fails? I do note the man-page says "connect failure". But things can fail before a connect()

Re: HTTP 2.0 and GFE/2.0

2014-03-31 Thread Gisle Vanem
"Daniel Stenberg" wrote: I get a different server but I did this: ./src/curl -v --http2 https://www.google.com * Trying 173.194.32.20... * Connected to www.google.com (173.194.32.20) port 443 (#0) * NPN, negotiated HTTP2 * We have switched to HTTP2 * http2_send len=82 * before_frame_send()

Re: HTTP 2.0 and GFE/2.0

2014-03-31 Thread Gisle Vanem
"Daniel Stenberg" wrote: I don't even know if PolarSSL supports those TLS extensions. I don't think so. You using a recent nghttp2? (I'm at v0.3.1-182-g8ccb6e4 right now, the current git HEAD) I built with NgHttp2 from today. But AFAICS, google is doing it right. The UTF-8 ("ASCII garbage

Re: HTTP 2.0 and GFE/2.0

2014-03-31 Thread Gisle Vanem
"Gisle Vanem" wrote: 05C0: 3E 54 68 61 74 E2 80 99 73 20 61 6E 20 65 72 72 >ThatOCOs an err 05D0: 6F 72 2E 3C 2F 69 6E 73 3E 0A 20 20 3C 70 3E 59 or.. Y 05E0: 6F 75 72 20 63 6C 69 65 6E 74 20 68 61 73 20 69 our client has i 05F0: 73 73 75 65 64 20 61 20 6D 61 6C 6

Re: [bagder/curl] 78e384: build: Added Visual Studio 2008 (VC9) project file...

2014-04-09 Thread Gisle Vanem
Author: Steve Holme Date: 2014-04-09 (Wed, 09 Apr 2014) Changed paths: M Makefile.am A projects/Windows/VC9/.gitignore A projects/Windows/VC9/curl.sln Shouldn't these be put in 'packages/Win32/VC9' instead? Or maybe 'packages/Win32/Visual-C/VC9'? The term 'package' is used in e.

Re: [Bulk] RE: Visual Studio Project Files

2014-04-09 Thread Gisle Vanem
"Steve Holme" wrote: really mind. I'd rather not move the directory into a Visual-C directory as a) That will require an update to all the files, both the ones I've commited as well as the ones I have pending, for the relative paths and b) Having Visual-C\VC6 includes the name twice when you ex

Re: curl crash in setsockopt callback

2014-04-12 Thread Gisle Vanem
"Priyanka Shah" wrote: And this is the callback's implementation: int sockopt_callback(void *clientp, curl_socket_t curlfd, curlsocktype purpose) { if(clientp == NULL) { printf("error"); return CURL_SOCKOPT_OK; } uint32_t data = *(uint32_t*)

Re: Missing 'state.os_err'

2014-05-08 Thread Gisle Vanem
"Daniel Stenberg" wrote: I would say that in all cases where we use errno in libcurl to check for success or failure, if we then fail we should store errno in data->state.os_errno. Does that sound reasonable? Yes, this OS-error (or errno) could be useful to the caller. That of course leads

Re: Static Library Compilation - Borland

2014-06-02 Thread Gisle Vanem
"Jon Torrey" wrote: I thought by default I didn't need to define SSL as libcurl by default will use Windows SSPI? No way! Anywho, I made the following change On line 56 of Makefile.b32 I have : DEFINES = -DNDEBUG -DWIN32 -DBUILDING_LIBCURL -DCURL_STATICLIB -USE_SSL Everything builds fin

Re: libcurl links to openssl libraries twice

2014-06-12 Thread Gisle Vanem
"Alona Rossen" wrote: We use the following protocols: BASIC DIGEST GSS_Negotiate NTLM Digest_IE IFIS_Delegation Does any of these involve ldap ? No, but why is it a problem that OpenSSL libs are in the dependencies twice? I assume ldap.so need SSL for secure ldap. Same for libsasl*.so. -

Re: Porting libcurl on embedded system with proprietary OS

2014-07-28 Thread Gisle Vanem
"Jon Torrey" wrote: Also - if anyone happens to have an INTEGRITY config file and could send me it as an example that would be greatly appreciated. You can probably get some ideas from the lwIP tcp/ip "hacks" built into libcurl. The lwIP + Windows combo actually works with some glue code for

Re: [bagder/curl] f18737: sasl_sspi: Fixed SPN not being converted to wchar ...

2014-08-09 Thread Gisle Vanem
Changed paths: M lib/curl_sasl_sspi.c Log Message: --- sasl_sspi: Fixed SPN not being converted to wchar under Unicode builds Now it seems only ldap.c is not UNICODE compatible. From MSVC compile of ldap.c with -D_UNICODE: ldap.c(219) : warning C4133: 'function' : incompatible t

Re: [bagder/curl] f18737: sasl_sspi: Fixed SPN not being converted to wchar ...

2014-08-10 Thread Gisle Vanem
"Steve Holme" wrote: Hehehe - Slight slip of the keyboard there but in some respects relevant ;-) However, I meant "comments are welcome". I'm not sure, but maybe a simple: #undef _UNICODE #undef UNICODE at the top of ldap.c should work. Otherwise things like 'struct hostname::name' in ur

Re: Ftp upload resume issuw with very big files.

2014-08-26 Thread Gisle Vanem
"Daniel Stenberg" wrote: On Tue, 26 Aug 2014, dushyant kumar wrote: I am trying to upload a file in a server using libcurl. Program works fine for small files (upto 5-6 GB ), however for very big files (more than 10 GB), it continues uploading even after the upload is over (By looking int

Re: [PATCH] Compile with latest nghttp2

2014-08-26 Thread Gisle Vanem
"Tatsuhiro Tsujikawa" wrote: totally agree with you. Should I include this change to the patch? Some other trouble I'm fighting with. In include/nghttp2/nghttp2.h the comment says: * Callback functions for :type:`nghttp2_session`. The details of * this structure are intentionally hidden

Re: SFTP problems

2014-10-22 Thread Gisle Vanem
"Daniel Karunairatnam" wrote: okay, so i opened one of those. but the librarian node isn't there. Which configuration do i need to change it to to access the librarian node? The instructions in the link you posted before require some changes there. I have no idea. But CmakeFiles seems more up

Re: Build errors on Windows

2014-11-05 Thread Gisle Vanem
Jan Ehrhardt wrote Correction: The same happens with WITH_SSH2=static. I am building against LIBSSH2 1.4.3. Curl 7.38.0 builded fine. Any idea what I am missing? Nothing. I noted that too and commented on it here: https://github.com/bagder/curl/commit/fa7d04fed4d4578fe29bdff0b5465f6e4a7da81a

Re: SMB long local write

2014-12-08 Thread Gisle Vanem
Patrick Monnerat wrote: Downloading a SMB file larger than 16K (CURL_MAX_WRITE_SIZE) with a DEBUGBUILD curl gives: Warning: Data size exceeds single call write limit! and the corresponding data is lost. I noted this too, but "curl -i smb://local-url" removes this warning. I have no

Re: List available curl options

2014-12-15 Thread Gisle Vanem
Jeroen Ooms wrote: #define MAKE_OPTION(a) {#a, CURLOPT_##a} typedef struct { char name[40]; int val; } keyval; keyval curl_options[] = { MAKE_OPTION(MUTE), MAKE_OPTION(ACCEPT_ENCODING), ... etc }; But currently this fails when calling MAKE_OPTION with an undefined symbol. Is th

Re: Cross-compiling linux to windows and OpenSSL

2014-12-28 Thread Gisle Vanem
Félix Robles wrote: curl-tool_xattr.o ../lib/curl-strtoofft.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o ../lib/curl-warnless.o -L/usr/local/ssl/lib ../lib/.libs/libcurl.a -lgdi32 -lssl -lcrypto -lws2_32 '-lgdi32' must come after the libs using it. So: -L/usr/local/ssl/lib ../lib/.libs/l

ldap.c and BoringSSL

2015-01-28 Thread Gisle Vanem
The combination BoringSSL and '-DUSE_WIN32_LDAP' doesn't work since 'X509_NAME' etc. are defined in as: #define X509_NAME (LPCSTR) 7 ... Which causes the compilation of "x509.h" (from "urldata.h") to fail (cpp output): typedef struct X509_name_st { struct stack_st_X509_NAME_ENTRY *entries

Re: ldap.c and BoringSSL

2015-01-28 Thread Gisle Vanem
Daniel Stenberg wrote: Interestingly, even OpenSSL has X509_NAME as a typedef, but I figure it is in a header not as commonly included so it hasn't hurt us in this case. OpenSSL's "x509.h" already has these undefs: #ifdef OPENSSL_SYS_WIN32 /* Under Win32 these are defined in wincrypt.h */

'session->ssl_version' now hidden

2015-02-04 Thread Gisle Vanem
The folks at OpenSSL have been very busy cleaning up it's API. So much that it broken vtls/openssl.c: vtls/openssl.c(1670) : error C2037: left of 'ssl_version' specifies undefined struct/union 'ssl_session_st' for the statement: switch(session->ssl_version) { 'struct ssl_session_st' is n

Re: How to retrieve webpage from curl_easy_perform

2015-03-03 Thread Gisle Vanem
Josh Angstadt wrote: Hi, I tried to use the write options as well, but when I used those I got an error from the > connection, speciifcally error code 23 23 == CURLE_WRITE_ERROR. Look at: https://raw.githubusercontent.com/bagder/curl/master/docs/examples/getinmemory.c for a bit complicate

Re: cant resolve host on visual studio 2013

2015-03-03 Thread Gisle Vanem
Azat Manukyan wrote: in both cases I haven't configured libcurl to any resolver.I supposed that didn't need to configure any resolver.firewall is turned of on windows. DNS resolver is working on windows environment because i can ping to given host, and system log viewer does not give any issues

WolfSSL version problems

2015-03-26 Thread Gisle Vanem
CyaSSL was renamed to WolfSSL some time ago. Libcurl and vtls/cyassl.c seems to suffer from this. I got the message: * CyaSSL <3.3.0 cannot be configured to use TLS 1.0-1.2, TLS 1.0 is used exclusively because of this: #if (LIBCYASSL_VERSION_HEX >= 0x03003000) /* 3.3.0 */ My CyaSSL/versio

Re: WolfSSL version problems

2015-03-26 Thread Gisle Vanem
Ray Satiro via curl-library wrote: There's supposed to be backwards compatibility with CyaSSL. Seems I had some problem with the generated ''; it didn't include ''. Maybe libcurl can test on 'USE_WOLFSSL' too in the event the include-path disappears in the future? I didn't have that proble

VS2013 Solution problems

2015-03-31 Thread Gisle Vanem
I need some help from an VisualStudio expert here. Steve? I've just installed the new, free "Microsoft Visual Studio Community 2013" and tried it by loading 'projects\Windows\VC12\curl-all.sln' and 'projects\Windows\VC12\lib\libcurl.sln' in it. I.e. "devenv libcurl.sln". VS 2013 is "Version 12.0

Re: compiling project using curl on msvs2010

2012-01-23 Thread Gisle Vanem
"Eugeny Melamud" wrote: I'm developing a dll that uses libcurl. I builded lib with vc6curlsrc.dsw project (I found it into srcfolder of curl distributive). Aheam, I think vc6curlsrc.dsw is for building the curl executable. You probably need to build with vc6libcurl.dsw. But where is .\lib\v

Re: Curl + Visual Studio 2010 - Application fails to initialize

2012-02-13 Thread Gisle Vanem
"eli" wrote: There are two PCs i work on, both have the same versions of Windows and the same versions of Visual Studio. The first is desktop PC and the second is laptop. It would be nice to know which Windows that is? Loaded '..\Debug\curllib.dll', Binary was not built with debug informa

Re: static link libcurl with VS2010 causes crash

2012-02-21 Thread Gisle Vanem
"JonathonS" wrote: stack below of the crash. msvcr100d.dll!_free() + 0x10 bytes xx.dll!destroy_async_data(Curl_async * async=0x003f2aa0) Line 326 + 0xe bytes C What excactly is it trying to free? Who allocated the data? You must make sure that the allocator and the code that does the free

Re: libcurl+openssl on windows

2012-02-28 Thread Gisle Vanem
"Alex Loukissas" wrote: I have an app that links statically against libcurl, which itself (libcurl) is built with openssl support. My app is cross-compiled on Linux with mingw-64 and run on Win7-64. The problem I'm facing is the following: Unless I use the CURLOPT_CAINFO option and hard-code a

Re: Cross-compiling libcurl for an embedded platform using lwip

2012-02-28 Thread Gisle Vanem
"Dan Fandrich" wrote: curl very much expects a BSD-style socket library. The best bet is to write a shim library that calls the LWIP socket functions using the standard names so that configure can find them. lwIP already has this shim built-in. Ref. src/include/lwip/sockets.h: #if LWIP_COMP

Re: Cross-compiling libcurl for an embedded platform using lwip

2012-02-28 Thread Gisle Vanem
"Dan Fandrich" wrote: Do the shim include files mirror the POSIX socket include files? If so, then adding something like CPPFLAGS=-Isrc/include/lwip/ to the configure like ought to make configure & curl pick them up. If not, it's trickier. I'm not sure about non-Windows; only that setup.h has

Re: Using libcurl on top of lwip on POSIX embedded platform (take 2)

2012-03-19 Thread Gisle Vanem
"Guenter" wrote: If its not possible to check if initialisation is required or not then its probably worth to talk to the lwip team and suggest an enhancement to lwip_init() so that it does simply nothing if the stack is already initialized. I can only speak for Windows. We can probably ass

Re: ftpget.c example error

2012-03-28 Thread Gisle Vanem
"Avi Manor" wrote: Please don't post in html. It's messy to format a sensible reply in html. While testing this example I have noticed that every call to my_fwrite comes with size = 1. This is the reason why the error is unnoticeable. However, it is not guaranteed to get every call with size

Re: pycurl/libcurl/libfaketime crash in clock_gettime

2012-04-04 Thread Gisle Vanem
"Dima Tisnek" wrote: Granted this is hardly an outright bug in pycurl, however I would rather like to track it down. Agreed, I think the bug must be in libfaketime. Ask them. stack head: #0 0x in ?? () #1 0x77bd9a3d in clock_gettime () from /dima/libfaketime/src/

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-09 Thread Gisle Vanem
"Marc Hörsken" wrote: this weekend I took the time to create a new SSL/TLS module für libcurl. It is now possible to use the Windows SSPI Schannel API for SSL and TLS connections. I looked at briefly. I even built with your code easily w/o knowing anything about SSPI. No problems building it.

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-09 Thread Gisle Vanem
"Marc Hörsken" wrote: Yes, that is basically the whole purpose of this. Schannel is a replacement for other SSL/TLS implementations, like OpenSSL. I am currently building it using the previously mentioned Makefile.vc in winbuild/ and can successfully do HTTPS without OpenSSL. Can you please t

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-09 Thread Gisle Vanem
"Marc Hörsken" wrote: I thought it was working for you, sorry for the misunderstanding. I though so too, but was mistaken. So, how exactly are you trying to build it? If you still want to do it. I got the 'mback2k-curl-curl-7_25_0-67-g306621b.zip' from git here: https://github.com/mback2

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-14 Thread Gisle Vanem
"Marc Hoersken" wrote: Therefore I consider those things something which I or others can add later on, because until these options are implemented in libcurl, Windows will choose the best available cipher from the registry and use certificates from the Windows Certification Store. Speaking of

Re: SSL/TLS support using Windows SSPI Schannel API

2012-04-14 Thread Gisle Vanem
"Marc Hoersken" wrote: functionality of SSL/TLS encryption behind the API. This is the whole purpose of the general SSPI API and provider approach. It might be hard to get some information out of it. I think I see. I've played a little at enumerating and getting the version of the security pa

Re: Using libcurl with zlib

2012-05-10 Thread Gisle Vanem
"east2006 east2006" wrote: 1>libcurl.lib(content_encoding.obj) : error LNK2019: unresolved external symbol _zlibVersion@0 referenced in function _Curl_unencode_gzip_write 1>.\Standalone-D\MelodoContent.exe : fatal error LNK1120: 5 unresolved externals I'm staticly compiling libcurl with zlib

Re: Using libcurl with zlib

2012-05-10 Thread Gisle Vanem
"east2006 east2006" wrote: Thank you, that solved it When compiling libcurl with zlib (MSVC), I get this error: libcurl.res : fatal error LNK1241: resource file zlib1d.lib(zlib1.res) already specified Well, zlib1.res must have been included twice. Why, I don't know. Where and how was zlib1d

host.name vs. host.dispname

2012-06-06 Thread Gisle Vanem
When running "curl --trace-ascii -", I see lots of such lines: == Info: Re-using existing connection! (#0) with host (nil) == Info: Connected to (nil) (194.103.154.240) port 443 (#0) I mean, the "(nil)" looks ugly. So to give a nicer trace, when 'host.name' is known, why not use that instead w

Re: host.name vs. host.dispname

2012-06-06 Thread Gisle Vanem
"Daniel Stenberg" wrote. I mean, the "(nil)" looks ugly. So to give a nicer trace, when 'host.name' is known, why not use that instead when 'host.dispname' is NULL? I don't get to see this. How do you get it like this? What name resolver is this libcurl built to use? The standard AFAICS. I

Re: Windows SSPI Schannel implementation ready

2012-06-12 Thread Gisle Vanem
"Marc Hoersken" wrote: I like this idea. That way Curl_schannel_version would still return something useful while avoiding the dependency on version.lib. Do you also mean that '-DWIN_USE_SSPI' also needs to drop the version.lib requirement? I mean, 'WIN_USE_SSPI' without 'USE_SCHANNEL'. I'm

curl_schannel.c and realloc()

2012-06-12 Thread Gisle Vanem
I've learned that using realloc() should be kept to a minimum; they could cause copying memory from old to new buffer, heap fragmentation etc. So, I noticed that the number of realloc() calls in libcurl has risen sharply with USE_SCHANNEL. A small test using: curl -v https://www.google.com res

CyaSSL problem in ldap.c

2012-06-13 Thread Gisle Vanem
From gcc/MingW: In file included from ../../CyaSSL-2.2.0/cyassl/openssl/ssl.h:31:0, from urldata.h:115, from ldap.c:68: ../../CyaSSL-2.2.0/cyassl/ssl.h:422:5: error: expected identifier before '(' token Reason being that OCSP_REQUEST+OCSP_RESPONSE are enum value

Re: host.name vs. host.dispname

2012-07-09 Thread Gisle Vanem
"Daniel Stenberg" wrote: Okay, but can you give me an exact command line you use to get it? I've not yet managed to repeat this problem and I would like to, so that I can perhaps make a test case for it. Sorry for the delay. I forgot about this. But this example shows the "(nil)" part in th

Re: What is the best way to debug this?

2012-07-15 Thread Gisle Vanem
"Igor Korot" wrote: Here is my code: [code] struct curl_slist *post = NULL; char *data; sprintf( data, "---%x", static_cast( time( NULL ) ) ); post = curl_slist_append( post, "Content-Type: multipart/form-data" ); post = curl_slist_append( post, "Expect: 1

Re: Unable to build libcurl on mingw with curl-7.26.0 -> Daniel

2012-07-19 Thread Gisle Vanem
"Guenter" wrote: Another option we could do in our GIT would be to at least add *.c and *.h to .gitattributes to so that they are also always forced to be checked out in LF format; AFAIK all compilers can deal with this. Haven't followed the thread so closely. The core problem is with the GN

Re: Unable to build libcurl on mingw with curl-7.26.0 -> Daniel

2012-07-19 Thread Gisle Vanem
"Guenter" wrote: Hello Gunter What do you mean with "problems with '\r\n'" ? Errors from 'sh' like: line 12: $'\r': command not found Did you actually run an autobuild from GIT with MSYS? No. I'm not keen on using Msys more than absolutely neccesary. Currently I dont believe that its

Re: Compiling under windows with USE_IDN=yes, patch needed

2012-07-28 Thread Gisle Vanem
"Jan Ehrhardt" wrote: I commented out the four lines starting with #ifdef WANT_IDN_PROTOTYPES in idn_win32.src and added the line #include at the same place. Result: the unresolved symbols are back again. That's because WINVER isn't set high enough. Look closely in . IdnToAscii etc. are ins

Re: Conflicting lines 273 and 317 in /lib/urldata.h

2012-07-28 Thread Gisle Vanem
"Jan Ehrhardt" wrote: The first error is the double declaration of 'connecting_state' in lines 273 and 317 of urldata.h. The next ones have to do with X509_NAME. ../../win32build/include/openssl\x509v3.h(192) : error C2059: syntax error : '(' line 192 of x509v3.h (OpelSSL 1.0.1c) is: X509_NAM

Re: ld.exe: cannot find -lcurl

2012-07-31 Thread Gisle Vanem
"Chris Ch" wrote: I am trying to compile a simple program which uses libcurl with Mingw using Msys. Here is my command and the output given: Chris@Chris-HP ~ $ gcc -L/usr/local/lib/libcurl.a -o live live.c -DCURL_STATICLIB -I/usr/local/include -lcurl c:/mingw/bin/../lib/gcc/mingw32/4.7.0/../..

Re: ld.exe: cannot find -lcurl

2012-07-31 Thread Gisle Vanem
"Chris Ch" wrote: Chris@Chris-HP ~ $ gcc -o live live.c -DCURL_STATICLIB -I/usr/local/include /usr/local/lib/libcu From your prompt, I thought you were not on Win32. How come you have "/usr/local/lib" on MingW? Sure you don't use MSys? In any case use: gcc -o live live.c -DCURL_STATICLIB

Re: Issues building with ZLIB and c-ares, Mingw on Win8 x64

2012-12-13 Thread Gisle Vanem
"Jesse Nicholson" wrote: Anyway so I downloaded latest release c-ares, zlib and curl... compiled c-ares successfully (although I can only get it to spit out a static lib), That's the problem. zlib compiled without issue, then on to curl. Curl will compile the static lib without issue, but a

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-03 Thread Gisle Vanem
"GitHub" i.e. Yang Tse wrote: 93 *.c source files renamed to use our standard naming scheme. .. A lib/curl_amigaos.c A lib/curl_asyn_ares.c A lib/curl_asyn_thread.c A lib/curl_axtls.c A lib/curl_base64.c A lib/curl_bundles.c Okay, but now we can say goodbye to 8+3 unique n

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-03 Thread Gisle Vanem
"Yang Tse" wrote: 2) When debugging libcurl or apps that use it with debuggers that are capable of showing the name of the source file it is much easier to know if one is stepping in libcurl's code or elsewhere. I think that's a good argument for renaming. From your message http://curl.hax

Re: [bagder/curl] 13606b: build: make use of 93 lib/*.c renamed files

2013-01-05 Thread Gisle Vanem
"Steve Holme" wrote: I'm still more in favour of going back to the old names and reverting the change. Me too. --gv --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.ht

Re: #include "setup.h" in libtest

2013-01-10 Thread Gisle Vanem
Yang, I think you forgot about patching tests/libtest. Some files under tests\libtest, includes "setup.h". (e.g. in chkhostname.c). Shouldn't that be '#include "curl_setup.h"'? My bad. Saw on an old version in git. --gv --- List

#include "setup.h" in libtest

2013-01-10 Thread Gisle Vanem
Yang, I think you forgot about patching tests/libtest. Some files under tests\libtest, includes "setup.h". (e.g. in chkhostname.c). Shouldn't that be '#include "curl_setup.h"'? --gv --- List admin: http://cool.haxx.se/list/listinf

[Patch] packages/DOS/common.dj

2013-01-10 Thread Gisle Vanem
gcc on DOS hasn't really supported COFF-debug (-gcoff) on djgpp for a long time. Eli Zaretskii wrote in: http://newsgroups.derkeiler.com/Archive/Comp/comp.os.msdos.djgpp/2012-01/msg00070.html "Sounds like the COFF debug info generation has bit-rotted in GCC. Nothing new here, no other platform

USE_ARES in config-win32.h

2013-01-10 Thread Gisle Vanem
lib/Makefile.m32 has this: ifdef ARES INCLUDES += -I"$(LIBCARES_PATH)" CFLAGS += -DUSE_ARES But lib/config-win32.h has this: /* Define to enable c-ares asynchronous DNS lookups. */ /* #define USE_ARES 1 */ /* Define to enable threaded asynchronous DNS lookups. */ #define USE_THREADS

Re: USE_ARES in config-win32.h

2013-01-11 Thread Gisle Vanem
"Yang Tse" wrote: config-platform.h in this case (config-win32.h) should be defining USE_ARES and verifying that USE_THREADS_WIN32 is not defined when "WITH_ARES" or "ENABLE_ARES" is defined. It's been a long time since I was involved in the asyn*.c / resolver stuff. Many other have contribut

ares_getsock() return value

2013-01-11 Thread Gisle Vanem
I'm not sure it matters, but the comment in asyn-ares.c is wrong: /* ... * Returns: CURLE_OK always! */ int Curl_resolver_getsock(struct connectdata *conn, curl_socket_t *socks, int numsocks) { .. int max = ares_getsock((ares_channel)conn->data-

Re: ares_getsock() return value

2013-01-13 Thread Gisle Vanem
"Daniel Stenberg" wrote: It's funny that we haven't noticed bigger problems with this from users. It might be that it is a fairly unusual limit to actual hit in real life. Have you tried to just bump it? Anyone else? No I haven't. Just caught this while reading and figuring out the c-ares

Re: [W32] Testsuite does not build in 7.28.1 anymore

2013-01-22 Thread Gisle Vanem
"LRN" wrote: compiled object files that go into libcurl. So the header tells it to link to dllimport mprintf functions, while the object files provide only normal mprintf functions for internal use. Right, unless you put a -DCURL_STATICLIB in your CFLAGS. And link with a static libcurl.a Thus

Re: Patch to get Windows proxy settings

2013-01-28 Thread Gisle Vanem
"Daniel Stenberg" wrote: 1 - you don't follow our code style, run lib/checksrc.pl and you'll find many errors (tabs, spaces, line lengths) And there's no need to typecast ret-vals from malloc(). libcurl is written in C, not C++. --gv --

Moving some files?

2013-01-28 Thread Gisle Vanem
Just some ideas I have to reduce the number of files in curl's root-dir: 1) Could ./Android.mk be moved to ./packages/Android like we do for other platforms? 2) Not sure about ./MacOSX-Framework. I do not know OSX-building. But a ./packages/OSX seems logical. 3) ./curl-style.el + ./sample.

Re: curl 7.28.1/MakefileBuild.vc bug?

2013-01-28 Thread Gisle Vanem
"Pierre Joye" wrote: However, I do not think we should allow non thread safe crt usage with curl. Not a big matter as recent versions of the VC does not support it anymore. 2003 (7.1) was the last version to support it: What you mean by "recent versions"? My version is: Microsoft (R) 32-bi

Re: Slow Upload Performance on High-Bandwidth connections on windows

2013-02-01 Thread Gisle Vanem
"Christian Hägele" wrote: The reason for that is the Curl_sndbufset-function in connect.c. On windows the socket-sendbuffer is set to a value of CURL_MAX_WRITE_SIZE + 32 (16416 bytes). There is a also a strange comment why this is done. When the SO_SNDBUF is not explicitly set the socket-send

Re: [bagder/curl] 0e66d5: vc: remove explicit MSVC6 IDE project file and doc...

2013-02-07 Thread Gisle Vanem
"Yang Tse" wrote: The possibility of building by other means is no reason to drop this. Sometimes the best way of debugging something is using the IDE, even when it is possible to build using makefiles. Also. MSVC6 IDE can generate makefiles from project files. Not sure if later MSVC IDEs can

Re: [PATCH] More features changes

2013-02-07 Thread Gisle Vanem
"Nick Zitzmann" wrote: @@ -173,6 +175,12 @@ FOOTNOTES *4 = requires FBopenssl *5 = requires a krb4 library, such as the MIT one or similar. *6 = requires c-ares - *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1 + *7 = requires OpenSSL, NSS, qssl, schannel, or Secur

tests/libtest/chkhostname.c

2013-02-08 Thread Gisle Vanem
This is AFAICS the only test program in this directory that doesn't call curl_global_init(). This function is needed for Curl_gethostname() to work on Windows at least. Besides it does a case-sensitive string compare of 'argv[1]' and return buffer from Curl_gethostname(). Aren't hostnames always

Mem leak in curl_ntlm_msg.c

2013-02-08 Thread Gisle Vanem
Running tests\libtest\libntlmconnect.exe reveals a 1 byte (!) leak in ./lib/curl_ntlm_msgs.c: perl ..\memanalyze.pl c:memdebug.curl Leak detected: memory still allocated: 1 bytes At 9771e8, there's 1 bytes. allocated by curl_ntlm_msgs.c:399 Snippet from curl_ntlm_msgs.c: /* setup ntlm identit

  1   2   3   >