1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

5166 Commits

Author SHA1 Message Date
Daniel Stenberg
6ccbd1bee4 typo: remove duplicate semicolon 2010-08-08 22:51:37 +02:00
Daniel Stenberg
1267719735 multi: avoid a malloc() when a transfer is complete
The struct used for storing the message for a completed transfer is now
no longer allocated separatly but is kept within the main struct kept
for each easy handle so that we avoid one malloc (and the subsequent
free).
2010-08-08 22:50:09 +02:00
Guenter Knauf
6ea043a504 Fix to overwrite libcurl name. 2010-08-07 18:33:46 +02:00
U-D5B1PQ1J\Administrador
7d342c723c build: allow NTLM tests to run on more build configurations 2010-08-07 15:03:54 +02:00
Guenter Knauf
11958ed331 Block created curlbuild.h for NetWare to avoid usage from other platforms. 2010-08-07 01:29:04 +02:00
Daniel Stenberg
f91d578674 multi_socket: set timeout for 100-continue
When libcurl internally decided to wait for a 100-continue header, there
was no call to the timeout function so there was no timeout callback
called when the multi_socket API was used and thus applications became
either completely wrong or at least ineffecient depending on how they
handled the situation. We now set a timeout to get triggered.

Reported by: Ben Darnell
Bug: http://curl.haxx.se/bug/view.cgi?id=3039744
2010-08-06 11:00:17 +02:00
Guenter Knauf
9df8257301 Some more Watcom makefile massage ...
For now removed the .autodepend directive until I've figured out
which of my changes broke it again.
2010-08-06 03:46:34 +02:00
Yang Tse
992ceae386 build: fix libssh2_scp_send64() availability 2010-08-05 16:27:39 +02:00
Yang Tse
364fd2f1ad build: remove unneeded cast to (void *) 2010-08-04 19:05:09 +02:00
Daniel Stenberg
f8cf037ecf SCP: send large files properly with new enough libssh2
libssh2 1.2.6 and later handle >32bit file sizes properly even on 32bit
architectures and we make sure to use that ability.

Reported by: Mikael Johansson
Bug: http://curl.haxx.se/mail/lib-2010-08/0052.html
2010-08-04 18:29:13 +02:00
Yang Tse
6028fdb305 build: add missing new files to non-configure target build files 2010-08-03 13:09:39 +02:00
Yang Tse
45456135d5 md4: replace bcopy usage with memcpy 2010-08-03 12:00:32 +02:00
Daniel Stenberg
a1a5ba3d0a Curl_connected_proxy: skip the bits.tcpconnect check
Simply because the TCP might be connected already we cannot skip the
proxy connect procedure. We need to be careful to not overload more
meaning to the bits.tcpconnect field like this.

With this fix, SOCKS proxies work again when the multi interface is
used. I believe this regression was added with commit 4b351d018e,
released as 7.20.1.

Left todo: add a test case that verifies this functionality that
prevents us from breaking it again in the future!

Reported by: Robin Cornelius
Bug: http://curl.haxx.se/bug/view.cgi?id=3033966
2010-08-02 23:17:30 +02:00
Daniel Stenberg
40253e32fe build: add typecast to avoid warning
There is an implicit conversion from "unsigned long" to "long";
rounding, sign extension, or loss of accuracy may result.
2010-08-02 18:53:34 +02:00
Guenter Knauf
3cf658fc24 Removed ugly dependency lists since wmake knows the .autodepend directive. 2010-08-02 05:51:17 +02:00
Guenter Knauf
6f3dc2a726 Removed wlink from DLL loader list because it doesnt work with Watcom < 1.8. 2010-08-02 01:30:37 +02:00
Guenter Knauf
b01fb30f9c Moved the LDAP API defines from Makefile.Watcom to config-win32.h.
These defines are only needed for older Watcom versions (< 1280).
2010-08-02 01:28:46 +02:00
Daniel Stenberg
811fcccfc9 multi: fix FTPS connecting the data connection with OpenSSL
Commit 496002ea1c (released in 7.20.1) broke FTPS when using the
multi interface and OpenSSL was used. The condition for the non-blocking
connect was incorrect.

Reported by: Georg Lippitsch
Bug: http://curl.haxx.se/mail/lib-2010-07/0270.html
2010-08-01 23:50:46 +02:00
Guenter Knauf
b552ca223e Fixed curlbuild.h rule. 2010-08-01 04:48:29 +02:00
Guenter Knauf
a93522f68d Added rule to create curlbuild.h if not present (for builds from git). 2010-08-01 02:39:03 +02:00
Guenter Knauf
fbee86a9e2 Fixed curl.exe static linking. 2010-07-31 11:52:05 +02:00
Daniel Stenberg
2f0c118577 warning: silence a win64 compiler warning
conversion from 'size_t' to 'curl_socklen_t', possible loss of data

Reported by: Adam Light
2010-07-30 23:19:47 +02:00
Daniel Stenberg
314117cbf1 smtp_connect: always provide host name buffer
Previously the host name buffer was only used if gethostname() exists,
but since we converted that into a curl private function that function
always exists and will be used so the buffer needs to exist for all
cases/systems.
2010-07-30 22:36:31 +02:00
Kamil Dudka
b5c3feda17 NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM
test-cases to override the system implementation of gethostname().  It
makes it possible to test the NTLM authentication for exact match, and
this way test the implementation of MD4 and DES.

If LD_PRELOAD doesn't work, a debug build willl also workk as debug
builds are now made to prefer a specific environment variable and will
then return that content as host name instead of the actual one.

Kamil wrote the bulk of this, Daniel Stenberg polished it.
2010-07-30 00:51:24 +02:00
Guenter Knauf
01c309e186 Added a comment with an alternate idea to avoid the backslash line contination character. 2010-07-29 09:06:55 +02:00
Guenter Knauf
d873c820bd Changed comparison to match size_t var type. 2010-07-29 05:33:04 +02:00
Guenter Knauf
41cf1f4090 Removed unused vars to avoid compiler warnings. 2010-07-29 05:20:43 +02:00
Guenter Knauf
6ad0acb608 Make Watcom makefiles use Makefile.inc to reduce future maintainance.
lib/Makefile.Watcom works fine already, for src/Makefile.Watcom we
need first to tweak src/Makefile.inc a bit - therefore the handtweaked
list still exists for now.
2010-07-29 03:50:09 +02:00
Guenter Knauf
cfbb351e22 Watcom makefiles overhaul.
- make both libcurl and curl makefiles use register calling convention
  (previously libcurl had stack calling convention).
- added include paths to the Watcom headers so its no longer required
  to set the environment vars for this.
- added -wcd=201 to supress compiler warning about unreachable code.
- use macros for all tools, and removed dependency on GNU tools like rm.
- make ipv6 and debug builds controlable via env vars and so make them
  optional instead of default.
- commented WINLDAPAPI and WINBERAPI since they broke with OW 1.8, and
  it seems they're not needed (anymore?).
- added rule for hugehelp.c.cvs so that it will be created when not
  already exist - this is required for building from a release tarball
  since there we have no hugehelp.c.cvs, thus compilation broke.
- removed C_ARG creation from lib/Makefile.Watcom and use CFLAGS
  directly as done too in src/Makefile.Watcom - this has the benefit
  that we will see all active cflags and defines during compile.
- added LINK-ARG to src/Makefile.Watcom in order to better control
  linker input.
- a couple of other minor makefile tweaks here and there ...
- added largefile support for Watcom builds to config-win32.h. Not yet
  tested if it really works, but should since Win32 supports it.
- added loaddll stuff to speed up builds if supported.
2010-07-29 03:18:40 +02:00
Guenter Knauf
11f53b9a18 some cosmetic changes. 2010-07-28 08:05:00 +02:00
Dan Fandrich
eb33f5d1f8 Added md4.c to the Watcom makefile 2010-07-26 16:41:27 -07:00
Daniel Stenberg
6d2ccfed48 add_buffer_send: fix compiler warning
Win64's 32 bit long but 64 bit size_t caused a warning that we avoid
with a typecast. A small whitespace indent fix was also applied.

Reported by: Adam Light
2010-07-24 22:52:35 +02:00
Guenter Knauf
7738b15977 Updated library versions. 2010-07-22 04:34:54 +02:00
Guenter Knauf
0fa4b41c2b Fixed script version which was still based on CVS Revision tag. 2010-07-22 04:29:54 +02:00
Ben Greear
affff47b3d ssh: Fix compile error on 64-bit systems.
Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-21 21:31:37 +02:00
Ben Greear
d6981cb508 build: Enable configure --enable-werror
This passes -Werror to gcc when building curl and libcurl,
  allowing easy dection of compile warnings.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-21 21:29:47 +02:00
Ben Greear
40ecd6c9b8 pingpong: Fix indentation (whitespace change only)
Signed-off-by: Ben Greear <greearb@candelatech.com>
2010-07-21 21:27:33 +02:00
Jan Van Boghout
181b08babb CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
... since FTP is using it as well, and potentially other protocols!

Also, an #endif CURL_DISABLE_HTTP was incorrectly marked, as it seems to
end the proxy block instead.
2010-07-18 20:23:08 +02:00
Jan Van Boghout
7abf3b97fe pingpong: response_time is milliseconds
Fixed the comment/document for the response_time struct member.
2010-07-18 00:49:29 +02:00
Jan Van Boghout
4a1384a8b4 ftp: response timeout bug in "quote" sending
The FTP implementation was missing a timestamp reset point, making the
waiting for responses after sending a post-transfer "QUOTE" command not
working as supposedly. This bug was introduced in 7.20.0
2010-07-18 00:44:25 +02:00
Constantine Sapuntzakis
d4e6404135 multi: fix condition that remove timers before trigger
curl_multi perform has two phases: run through every easy handle calling
multi_runsingle and remove expired timers (timer removal).

If a small timer (e.g. 1-10ms) is set during multi_runsingle, then it's
possible that the timer has passed by when the timer removal runs. The
timer which was just added is then removed. This will potentially cause
the timer list to be empty and cause the next call to curl_multi_timeout
to return -1. Ideally, curl_multi_timeout should return 0 in this case.

One way to fix this is to move the struct timeval now = Curl_tvnow(); to
the top of curl_multi_perform. The change does that.
2010-07-12 19:19:31 +02:00
Constantine Sapuntzakis
3992309285 threaded resolver: fix timeout issue
Reset old timer first so we can set a new one further in the future.
2010-07-12 19:03:51 +02:00
Daniel Stenberg
e01cc7737c http: don't enable chunked during authentication negotiations
As mentioned in bug report #2956968, the HTTP code wouldn't send the
first empty chunk during the auth negotiation phase of the HTTP request
sending, so the server would wait for data to come and libcurl would
wait for data to arrive... I've made the code not enable chunked
encoding until the auth negotiation is done and thus this scenario
doesn't occur anymore.

Reported by: Sidney San Martín
Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
2010-07-06 22:50:21 +02:00
Daniel Stenberg
9be951a415 multi: CURLINFO_LASTSOCKET doesn't work after remove_handle
When curl_multi_remove_handle() is called and an easy handle is returned
to the connection cache held in the multi handle, then we cannot allow
CURLINFO_LASTSOCKET to extract it since that will more or less encourage
that the user uses the socket while it can get used by libcurl again.

Without this fix, we'd get a segfault in Curl_getconnectinfo() trying to
dereference the NULL pointer in 'data->state.connc'.

Bug: http://curl.haxx.se/bug/view.cgi?id=3023840
2010-07-01 23:32:20 +02:00
Pierre Joye
7239538d9a build: add enable IPV6 option for the VC makefiles 2010-06-30 19:42:37 +02:00
Kamil Dudka
f3b77e5611 http_ntlm: add support for NSS
When configured with '--without-ssl --with-nss', NTLM authentication
now uses NSS crypto library for MD5 and DES.  For MD4 we have a local
implementation in that case.  More details are available at
https://bugzilla.redhat.com/603783

In order to get it working, curl_global_init() must be called with
CURL_GLOBAL_SSL or CURL_GLOBAL_ALL.  That's necessary because NSS needs
to be initialized globally and we do so only when the NSS library is
actually required by protocol.  The mentioned call of curl_global_init()
is responsible for creating of the initialization mutex.

There was also slightly changed the NSS initialization scenario, in
particular, loading of the NSS PEM module.  It used to be loaded always
right after the NSS library was initialized.  Now the library is
initialized as soon as any SSL or NTLM is required, while the PEM module
is prevented from being loaded until the SSL is actually required.
2010-06-30 13:12:25 +02:00
Pavel Raiskup
f7ae7b3623 ftp wildcard: FTP LIST parser FIX
There was a problem when a UNIX-like server returned information
about directory size (total NNNNNN) at the first line of
response.
2010-06-24 23:45:44 +02:00
Daniel Stenberg
8da56e12c6 multi_socket: re-use of same socket without notifying app
When a hostname resolves to multiple IP addresses and the first one
tried doesn't work, the socket for the second attempt may get dropped on
the floor, causing the request to eventually time out. The issue is that
when using kqueue (as on mac and bsd platforms) instead of select, the
kernel removes the first fd from kqueue when it is closed (in trynextip,
connect.c:503). Trynextip() then goes on to open a new socket, which
gets assigned the same number as the one it just closed. Later in
multi.c, socket_cb is not called because the fd is already in
multi->sockhash, so the new socket is never added to kqueue.

The correct fix is to ensure that socket_cb is called to remove the fd
when trynextip() closes the socket, and again to re-add it after
singleipsocket(). I'm not sure how to cleanly do that, but the attached
patch works around the problem in an admittedly kludgy way by delaying
the close to ensure that the newly-opened socket gets a different fd.

Daniel's added comment: I didn't spot a way to easily do a nicer fix so
I've proceeded with Ben's patch.

Bug: http://curl.haxx.se/bug/view.cgi?id=3017819
Patch by: Ben Darnell
2010-06-24 23:22:24 +02:00
Pavel Raiskup
0a04078916 ftp-wildcard: avoid tight loop when used without any pattern
It was broken for URLs like "ftp://example.com/".
2010-06-24 10:18:17 +02:00
Daniel Stenberg
1b15b31c86 sendrecv: treat all negative values from send/recv as errors
For example the libssh2 based functions return other negative
values than -1 to signal errors and it is important that we catch
them properly. Right before this, various failures from libssh2
were treated as negative download amounts which caused havoc.
2010-06-19 00:18:14 +02:00