Commit Graph

5588 Commits

Author SHA1 Message Date
Yang Tse c8c8816a97 socks: fix unaligned memory access 2011-05-26 14:53:13 +02:00
Daniel Stenberg 017ee34bba create_conn: only switch protocol handler if necessary
When switching to HTTP because a HTTP proxy is being used, the existing
handler is now checked if it already is "compatible". This allows the https
handler remain while other non-http handlers will be redirected.

Bug: http://curl.haxx.se/mail/lib-2011-05/0214.html
Reported by: Jerome Robert
2011-05-25 15:57:38 +02:00
Yang Tse a947a9ac62 compiler warning: fix followup
Fix compiler warning: variable was set but never used

Fix compiler warning: clobber ignored
2011-05-25 09:56:57 +02:00
Yang Tse b735717606 compiler warning: fix
Fix compiler warning: variable was set but never used

Fix compiler warning: clobber ignored
2011-05-24 20:39:58 +02:00
Yang Tse a41c7f9736 build: inclusion guard
Enclose header file in an inclusion guard
2011-05-24 15:42:02 +02:00
Yang Tse 512b2f7740 compiler warning: fix
Fix compiler warning: expression has no effect
2011-05-24 15:18:26 +02:00
Yang Tse 8bdc48eddb compiler warning: fix
Fix compiler warning: `keycheck' might be used uninitialized in this function.
Fix compiler warning: `keybit' might be used uninitialized in this function.
2011-05-23 19:37:41 +02:00
Yang Tse 328600e02b compiler warning: fix
Fix variable declaration placement
2011-05-23 19:04:49 +02:00
Yang Tse e2747ebbc0 compiler warning: fix
Fix missing semicolon
2011-05-23 16:59:43 +02:00
Yang Tse 41ebda02b2 compiler warning: fix
Fix compiler warning: expression has no effect

Fix OOM handling
2011-05-23 16:55:49 +02:00
Yang Tse 30c9799f72 compiler warning: fix
Fix compiler warning: expression has no effect
2011-05-23 16:55:09 +02:00
Yang Tse bed6b89a2f compiler warning: fix
Fix compiler warning: unused variable 'data'
2011-05-23 12:57:23 +02:00
Yang Tse 3e70c28ce5 compiler warning: fix
Fix compiler warning: enumerated type mixed with another type
2011-05-21 15:06:50 +02:00
Yang Tse 79cc6c244a compiler warning: fix
Fix compiler warning: enumerated type mixed with another type
2011-05-21 14:59:03 +02:00
Yang Tse d30ddd9977 compiler warning: fix
Fix compiler warning: enumerated type mixed with another type
2011-05-21 14:55:10 +02:00
Yang Tse fce7276f54 compiler warning: fix
Fix compiler warning: enumerated type mixed with another type
2011-05-21 14:10:17 +02:00
Yang Tse 004d84fcc1 compiler warning: fix
Fix compiler warning: empty body in an if-statement
2011-05-21 13:46:37 +02:00
Ola Mork 3912e7bde3 cyassl: build without filesystem
Get cyassl's NO_FILESYSTEM to work with libcurl. Otherwise I'd get linker
errors for the missing "SSL_CTX_load_verify_locations" functions.
2011-05-20 23:40:59 +02:00
Yang Tse 5db30a1d8c version: linkage fix
Fix linkage on c-ares enabled Windows static builds
2011-05-19 11:50:20 +02:00
Daniel Stenberg 60f0ebbdc9 CLOSESOCKETFUNCTION: use the callback
Fix the return type of the callback to match close() and make use of it.
2011-05-18 22:56:46 +02:00
Daniel Stenberg b5d170b551 CLOSESOCKETFUNCTION: added
Introduced the initial setup to allow closesocket callbacks by making
sure sclose() is only ever called from one place in the libcurl source
and still run all test cases fine.
2011-05-18 22:56:46 +02:00
Daniel Stenberg d4e000906a GnuTLS handshake: fix timeout
Commit cbf4961bf3 garbled the timeout handling while doing SSL
handshaking (in an attempt at fixing another bug). This puts sanity
back.

Bug: http://curl.haxx.se/mail/lib-2011-05/0167.html
Reported by: Ethan Glasser Camp
2011-05-18 20:48:42 +02:00
Daniel Stenberg bb7ff942d3 checksrc: trailing whitespace detection fix 2011-05-16 15:21:32 +02:00
Marcel Roelofs 48a40f0402 negotiate sspi: fix sequential requests 2011-05-16 15:21:32 +02:00
Dan Fandrich 2a02c07a15 Fixed compilation when RTSP is disabled 2011-05-06 13:48:59 -07:00
Dan Fandrich 212d8c8f65 Fixed LDAP after RTSP readwrite change 2011-05-06 13:48:24 -07:00
Daniel Stenberg 32001ac414 set_userpass: convert from protocol-specific to generic
The protocol handler's flags field now can set that the protocol
requires a password, so that the set_userpass function doesn't have to
have the specific knowledge of which protocols that do.
2011-05-05 17:07:21 +02:00
Daniel Stenberg 9c629e5348 RTSP: cleanups
Made several functions static

Made one function defined to nothing when RTSP is disabled to avoid
the #ifdefs in code.

Removed explicit rtsp.h includes
2011-05-05 16:53:05 +02:00
Daniel Stenberg f0612f166a RTSP: convert protocol-specific checks to generic
Add a 'readwrite' function to the protocol handler struct and use that
for the extra readwrite functionality RTSP needs.
2011-05-05 16:27:03 +02:00
Daniel Stenberg e34131db78 SSL: check for SSL, not specific protocols
Code cleanup to check less for protocols and more for the specific
relevant feature. Like if SSL is required.
2011-05-05 15:49:43 +02:00
Daniel Stenberg 335dfa793c http_perhapsrewind: remove HTTP check
No need to check for HTTP as this is now a HTTP-specific function
2011-05-05 15:38:01 +02:00
Daniel Stenberg 574aecee20 http_perhapsrewind:
make it static, remove Curl_ prefix
2011-05-05 15:18:31 +02:00
Daniel Stenberg 51075a6777 remove FILE protocol-specific checks
Also, convert the BANPROXY flag into NONETWORK for the protocols
(file:// only atm) that don't work over networks.
2011-05-05 15:14:19 +02:00
Daniel Stenberg 558f997e99 socks proxy: allow socks5h:// prefix too
Using 'socks5h' as proxy protocol will make it a
CURLPROXY_SOCKS5_HOSTNAME proxy which is SOCKS5 and asking the proxy to
resolve host names. I found no "standard" protocol name for this.
2011-05-05 11:47:55 +02:00
Daniel Stenberg 61877b569f Corrected comments
closepolicy has been deprecated and unused for years
2011-05-05 00:02:39 +02:00
Daniel Stenberg dc15a88076 ConnectionStore: remove unused return code 2011-05-04 23:56:18 +02:00
Daniel Stenberg adae5926dd indent correctly 2011-05-04 23:45:30 +02:00
Daniel Stenberg 7d94af497d SSH: set non-blocking earlier
Introduce an INIT state for the SSH state machine and set libssh2
non-blocking in that so that it is set properly before
libssh2_session_startup() is called.

Bug: http://curl.haxx.se/mail/archive-2011-05/0001.html
2011-05-01 23:02:39 +02:00
Daniel Stenberg 821301de15 ConnectionExists: avoid NULL dereference
When checking for connections that are bound to a particular device we
must make sure we don't compare with a NULL pointer.
2011-04-29 16:46:49 +02:00
Daniel Stenberg 3440f4d374 resolver_error: remove bad semicolon 2011-04-29 16:33:45 +02:00
Daniel Stenberg 5b7e1f9efe gai_strerror: provide private implementation
There are systems (like NetWare) without its own gai_strerror()
function.
2011-04-28 15:25:03 +02:00
Daniel Stenberg c33aee1667 treaded-resolver: better error messages
Now use gai_strerror() to get proper error messages when getaddrinfo()
has failed. Detect the function in configure.

Code based on work and suggestions by Jeff Pohlmeyer and Guenter Knauf
2011-04-28 15:25:03 +02:00
Daniel Stenberg 3b1b26578f proxy: allow socks:// prefix in proxy string
Inspired by a patch from OB.Conseil. Added test case 708 to verify.
2011-04-28 15:08:09 +02:00
Zmey Petroff 2cbe885c1a CMake: improve library search, implement install.
Improved library search by check_function_exists_concat() macro:
it does not revert the list of libraries any more.

Improved OpenSSL library search: first find zlib, then search for
openssl libraries that may depend on zlib.

For Unix: openssl libraries can now be detected in nonstandard
locations. Supply CMAKE_LIBRARY_PATH to CMake on command line.

Added installation capability (very basic one yet).
2011-04-28 10:12:33 +02:00
Daniel Stenberg 4a42e5cdaa multi-socks: fix connect to proxy
When connecting to a socks or similar proxy we do the proxy handshake at
once when we know the TCP connect is completed and we only consider the
"connection" complete after the proxy handshake. This fixes test 564
which is now no longer considered disabled.

Reported by: Dmitri Shubin
Bug: http://curl.haxx.se/mail/lib-2011-04/0127.html
2011-04-28 10:06:49 +02:00
Daniel Stenberg 53ef3493bf cleanup: remove old unused debug code 2011-04-28 09:21:20 +02:00
Dan Fandrich cbd98b2c28 Make checksrc.pl work on out-of-tree builds
Source files given with absolute paths do not have the
-D directory specifier prepended.
2011-04-27 12:42:15 -07:00
Daniel Stenberg 4685db9462 make: add checksrc.pl to dist 2011-04-27 11:42:02 +02:00
Daniel Stenberg 45de057920 make: add 'checksrc' as target to check code style
The make target checksrc now works in the root makefile and in both the
src and lib directories.

It is also run automatically on "all" if configure --enable-debug was
used.
2011-04-27 10:23:27 +02:00
Daniel Stenberg 6a6981503e checksrc: add -W to allow a file to be whitelisted
Useful when a known file just doesn't comply and there's no intention to
make it do so.
2011-04-27 09:09:35 +02:00