]> granicus.if.org Git - curl/log
curl
14 years agoURL-parsing: consider ? a divider
Daniel Stenberg [Tue, 19 Oct 2010 18:20:06 +0000 (20:20 +0200)]
URL-parsing: consider ? a divider

The URL parser got a little stricter as it now considers a ? to be a
host name divider so that the slightly sloppier URLs work too. The
problem that made me do this change was the reported problem with an URL
like: www.example.com?email=name@example.com This form of URL is not
really a legal URL (due to the missing slash after the host name) but is
widely accepted by all major browsers and libcurl also already accepted
it, it was just the '@' letter that triggered the problem now.

The side-effect of this change is that now libcurl no longer accepts the
?  letter as part of user-name or password when given in the URL, which
it used to accept (and is tested in test 191). That letter is however
mentioned in RFC3986 to be required to be percent encoded since it is
used as a divider.

Bug: http://curl.haxx.se/bug/view.cgi?id=3090268

14 years agocurl_easy_setopt.3: spellfix
Daniel Stenberg [Tue, 19 Oct 2010 15:50:10 +0000 (17:50 +0200)]
curl_easy_setopt.3: spellfix

14 years agocurl_easy_setopt.3: CURLOPT_USE_SSL is not just for FTP
Daniel Stenberg [Tue, 19 Oct 2010 15:48:51 +0000 (17:48 +0200)]
curl_easy_setopt.3: CURLOPT_USE_SSL is not just for FTP

It is for FTP, SMTP, POP3, IMAP at least.

14 years agokrb4.h: removed unused prototypes
Daniel Stenberg [Mon, 18 Oct 2010 14:20:13 +0000 (16:20 +0200)]
krb4.h: removed unused prototypes

14 years agokrb4: make a few functions static
Daniel Stenberg [Mon, 18 Oct 2010 08:00:37 +0000 (10:00 +0200)]
krb4: make a few functions static

14 years agoTODO-RELEASE: cleanup for 7.21.3 works
Daniel Stenberg [Sun, 17 Oct 2010 16:56:30 +0000 (18:56 +0200)]
TODO-RELEASE: cleanup for 7.21.3 works

"SFTP resume with 4GB file does not work" is now removed as I'm sure
this is really a libssh2 bug and not a libcurl bug.

7.21.2 is released already

14 years agoRELEASE-NOTES: sync with 09a2d93a0f17ca
Daniel Stenberg [Sun, 17 Oct 2010 16:55:36 +0000 (18:55 +0200)]
RELEASE-NOTES: sync with 09a2d93a0f17ca

14 years agohttp_chunks: remove debug output
Daniel Stenberg [Sun, 17 Oct 2010 16:50:38 +0000 (18:50 +0200)]
http_chunks: remove debug output

Accidentally left in there during my previous debugging of this

14 years agoCurl_setopt: disallow CURLOPT_USE_SSL without SSL support
Daniel Stenberg [Thu, 14 Oct 2010 20:33:20 +0000 (22:33 +0200)]
Curl_setopt: disallow CURLOPT_USE_SSL without SSL support

In order to avoid for example the pingpong protocols to issue STARTTLS
(or equivalent) even though there's no SSL support built-in.

Reported by: Sune Ahlgren
Bug: http://curl.haxx.se/mail/archive-2010-10/0045.html

14 years agooptions: check for features for some options
Daniel Stenberg [Thu, 14 Oct 2010 20:17:32 +0000 (22:17 +0200)]
options: check for features for some options

Some options, such as the automatic decompression and some SSL related
ones now will bail out if the underlying libcurl doesn't have support
for the particular feature needed.

14 years agoFixed the IPv6 host address in test1203
Dan Fandrich [Thu, 14 Oct 2010 19:45:01 +0000 (12:45 -0700)]
Fixed the IPv6 host address in test1203

Reported by: Christian Weisgerber
Bug: http://curl.haxx.se/bug/view.cgi?id=3087479

14 years agocurl_easy_setopt.3: clarify CURLOPT_CRLF
Daniel Stenberg [Thu, 14 Oct 2010 12:06:07 +0000 (14:06 +0200)]
curl_easy_setopt.3: clarify CURLOPT_CRLF

The option takes a parameter that should be 1 or 0 to enable or disable
the feature.

URL: http://curl.haxx.se/bug/view.cgi?id=3086428

14 years agoSome more small Watcom makefile fixes.
Guenter Knauf [Wed, 13 Oct 2010 23:22:40 +0000 (01:22 +0200)]
Some more small Watcom makefile fixes.

14 years agoAdded --noconfigure switch to testcurl.pl.
Guenter Knauf [Wed, 13 Oct 2010 22:57:36 +0000 (00:57 +0200)]
Added --noconfigure switch to testcurl.pl.

14 years agoModified Watcom makefiles to work on Linux too.
Guenter Knauf [Wed, 13 Oct 2010 15:29:47 +0000 (17:29 +0200)]
Modified Watcom makefiles to work on Linux too.

14 years agoAdded MingW32 rtmp target; changed Watcom targets.
Guenter Knauf [Wed, 13 Oct 2010 14:38:24 +0000 (16:38 +0200)]
Added MingW32 rtmp target; changed Watcom targets.

Modified Watcom targets to avoid backslashs so that they can
work on Linux too.

14 years agogitignore: ignore Makefile.vc10.dist made by maketgz
Daniel Stenberg [Tue, 12 Oct 2010 22:26:19 +0000 (00:26 +0200)]
gitignore: ignore Makefile.vc10.dist made by maketgz

14 years agocurlver.h: start over at 7.21.3
Daniel Stenberg [Tue, 12 Oct 2010 22:21:39 +0000 (00:21 +0200)]
curlver.h: start over at 7.21.3

14 years agoRELEASE-NOTES: start over towards 7.21.3
Daniel Stenberg [Tue, 12 Oct 2010 22:21:00 +0000 (00:21 +0200)]
RELEASE-NOTES: start over towards 7.21.3

14 years agoTHANKS: added contributors from 7.21.2
Daniel Stenberg [Tue, 12 Oct 2010 22:20:37 +0000 (00:20 +0200)]
THANKS: added contributors from 7.21.2

14 years agoRELEASE-NOTES: synced with ecd624b8e774a85 curl-7_21_2
Daniel Stenberg [Tue, 12 Oct 2010 21:28:44 +0000 (23:28 +0200)]
RELEASE-NOTES: synced with ecd624b8e774a85

14 years agoCMake: Build fix.
Julien Chaffraix [Tue, 12 Oct 2010 15:27:56 +0000 (08:27 -0700)]
CMake: Build fix.

Do not match the trailing '\n' in the regular expression as this would
make us dump a ) parenthesis on a new line.

This fixes the following error:

would get transformed into:

)

Bug: http://curl.haxx.se/mail/lib-2010-10/0065.html
Reported by: Dimitre Dimitrov

14 years agoheader_callback: strip off file path separated with backslashes
Daniel Stenberg [Thu, 16 Sep 2010 21:11:48 +0000 (23:11 +0200)]
header_callback: strip off file path separated with backslashes

If the filename contains a backslash, only use filename portion. The
idea is that even systems that don't handle backslashes as path
separators probably want that path removed for convenience.

This flaw is considered a security problem, see the curl security
vulnerability http://curl.haxx.se/docs/adv_20101013.html

14 years agoGet the curl source files for Amiga from Makefile.inc
Dan Fandrich [Tue, 12 Oct 2010 19:12:40 +0000 (12:12 -0700)]
Get the curl source files for Amiga from Makefile.inc

This is similar to how it's done in the lib directory.
The Amiga build appears to have been broken for a year because
of a missing homedir.c

14 years agoAdded section on server-supplied names to security considerations
Dan Fandrich [Tue, 12 Oct 2010 18:22:18 +0000 (11:22 -0700)]
Added section on server-supplied names to security considerations

14 years agoFixed Watcom makefile.
Guenter Knauf [Tue, 12 Oct 2010 13:31:41 +0000 (15:31 +0200)]
Fixed Watcom makefile.

14 years agoAdded build bits for librtmp / libssh2 to Watcom makefiles.
Guenter Knauf [Tue, 12 Oct 2010 04:55:01 +0000 (06:55 +0200)]
Added build bits for librtmp / libssh2 to Watcom makefiles.

14 years agoAdded build bits for librtmp to NetWare makefiles.
Guenter Knauf [Tue, 12 Oct 2010 02:31:56 +0000 (04:31 +0200)]
Added build bits for librtmp to NetWare makefiles.

14 years agoSFTP: more ignoring negative file sizes
Daniel Stenberg [Mon, 11 Oct 2010 22:01:40 +0000 (00:01 +0200)]
SFTP: more ignoring negative file sizes

As the change in 5f0ae7a0626cbe709 added a precaution against negative
file sizes that for some reason managed to get returned, this change now
introduces the same check at the second place in the code where the file
size from the libssh2 stat call is used.

This check might not be suitable for a 32 bit curl_off_t, but libssh2.h
assumes long long to work and to be 64 bit so I believe such a small
curl_off_t will be very unlikely to occur in the wild.

14 years agoSMTP: debug output for no known auth mechanisms supported
Daniel Stenberg [Mon, 11 Oct 2010 19:31:12 +0000 (21:31 +0200)]
SMTP: debug output for no known auth mechanisms supported

... and some minor source code whitespace edits

14 years agotest: urlglob error messages have no extra newline anymore
Daniel Stenberg [Mon, 11 Oct 2010 12:32:37 +0000 (14:32 +0200)]
test: urlglob error messages have no extra newline anymore

14 years agoAdded build bits for librtmp to MingW32 makefiles.
Guenter Knauf [Sun, 10 Oct 2010 22:39:24 +0000 (00:39 +0200)]
Added build bits for librtmp to MingW32 makefiles.

14 years agoRELEASE-NOTES: synced with 61f4cdb73ae4
Daniel Stenberg [Fri, 8 Oct 2010 21:20:26 +0000 (23:20 +0200)]
RELEASE-NOTES: synced with 61f4cdb73ae4

14 years agoglobbing: fix crash on unballanced open brace
Daniel Stenberg [Fri, 8 Oct 2010 21:12:34 +0000 (23:12 +0200)]
globbing: fix crash on unballanced open brace

Having an open brace without a closing brace caused a segfault.

Having a closing brace too many caused a silent error to occur, which
caused curl to bail out and return an error code but no error message
was shown. It does now!

All error message outputs no longer wrongly get _two_ newlines written
after the error message.

Reported by: Vlad Ureche
Bug: http://curl.haxx.se/bug/view.cgi?id=3083942

14 years agolibcurl.m4: AC_PATH_PROG fixes
Dan Locks [Thu, 7 Oct 2010 16:05:36 +0000 (18:05 +0200)]
libcurl.m4: AC_PATH_PROG fixes

The invocation of autoconf's AC_PATH_PROG( ) is not quite right for
finding curl-config. This fix corrects the negative case (where
curl-config is not found).

14 years agoFAQ: added "How do I submit my patch?"
Daniel Stenberg [Wed, 6 Oct 2010 18:03:13 +0000 (20:03 +0200)]
FAQ: added "How do I submit my patch?"

14 years agoexamples: use example.com in example URLs
Daniel Stenberg [Tue, 5 Oct 2010 13:00:19 +0000 (15:00 +0200)]
examples: use example.com in example URLs

14 years agoTODO-RELEASE: libidn problem not repeatable
Daniel Stenberg [Mon, 4 Oct 2010 09:53:33 +0000 (11:53 +0200)]
TODO-RELEASE: libidn problem not repeatable

"261 - configure and libidn" is removed from the list since Julien
Chaffraix tried to repeat it but failed and the reporter did not return
to provide further details.

Reported by: Lyndon Hill
Bug: http://curl.haxx.se/mail/lib-2010-07/0029.html

14 years agolibcurl.m4: mention argument is PREFIX
Daniel Stenberg [Mon, 4 Oct 2010 09:50:43 +0000 (11:50 +0200)]
libcurl.m4: mention argument is PREFIX

The macro provides a --with-libcurl option that expects a PREFIX to be
specified and not actually a "directory" in which libcurl will be found.
This now spells that out more clearly.

Reported by: Dan Locks
Bug: http://curl.haxx.se/bug/view.cgi?id=3079891

14 years agoSome NetWare makefile tweaks.
Guenter Knauf [Sun, 3 Oct 2010 21:02:41 +0000 (23:02 +0200)]
Some NetWare makefile tweaks.

Renamed SDK_* to NDK_*; made NDK_* defines overwriteable from
environment; removed now obsolete YACC macro;
moved some curl_config.h defines to IPv6 section since they
are only needed when IPv6 is enabled - this makes libcurl compile
with older NDKs too which were not IPv6-aware.

14 years agoTODO-RELEASE: 416 error fixed
Daniel Stenberg [Sat, 2 Oct 2010 12:37:38 +0000 (14:37 +0200)]
TODO-RELEASE: 416 error fixed

"3076808 Requests fail silently following a 416 error" done

14 years agokrb5-gssapi: Removed a memory leak in krb5_auth.
Julien Chaffraix [Sat, 2 Oct 2010 07:54:34 +0000 (00:54 -0700)]
krb5-gssapi: Removed a memory leak in krb5_auth.

We forgot to release the buffer passed to gss_init_sec_context.

The previous logic was difficult to read as we were reusing the same
variable (gssbuf) for both input buffer and output buffer. Splitted the
logic in 2 variables to better underline who needs to be released.
Also made the code break at 80 lines.

14 years agokrb5-gssapi: Made the function always return a value.
Julien Chaffraix [Sat, 2 Oct 2010 07:39:51 +0000 (00:39 -0700)]
krb5-gssapi: Made the function always return a value.

kr5_auth missed a final 'return' statement. This is not an error in
gcc but can lead to potential bugs.

14 years agokrb5-gssapi: Delete the GSS-API context.
Julien Chaffraix [Sat, 2 Oct 2010 07:33:24 +0000 (00:33 -0700)]
krb5-gssapi: Delete the GSS-API context.

This fixes a memory leak related to the GSS-API code.

Added a krb5_init and krb5_end functions. Also removed a work-around
the lack of proper initialization of the GSS-API context.

14 years agoHTTP: remove special case for 416
Daniel Stenberg [Fri, 1 Oct 2010 22:22:48 +0000 (00:22 +0200)]
HTTP: remove special case for 416

It was pointed out that the special case libcurl did for 416 was
incorrect and wrong. 416 is not really different to other errors so the
response body must be handled like for other errors/http responses.

Reported by: Chris Smowton
Bug: http://curl.haxx.se/bug/view.cgi?id=3076808

14 years agosws: Added writedelay HTTP server command
Dan Fandrich [Fri, 1 Oct 2010 22:21:59 +0000 (00:21 +0200)]
sws: Added writedelay HTTP server command

This delays between write operations, hopefully making it easier
to spot problems where libcurl doesn't flush the socket properly
before waiting for the next response.

14 years agoTODO-RELEASE: no bug in ftp_nextconnect
Daniel Stenberg [Fri, 1 Oct 2010 20:47:45 +0000 (22:47 +0200)]
TODO-RELEASE: no bug in ftp_nextconnect

The issue named "266 - Bug in ftp_nextconnect?" was deemed to not be a
bug and instead resulted in clarified docs.

14 years agocurl_easy_setopt.3: CURLOPT_DIRLISTONLY implies dir list
Daniel Stenberg [Fri, 1 Oct 2010 17:52:53 +0000 (19:52 +0200)]
curl_easy_setopt.3: CURLOPT_DIRLISTONLY implies dir list

Make it explicit that setting CURLOPT_DIRLISTONLY to 1 will make libcurl
to list the directory.

14 years agoRELEASE-NOTES: synced up to 588402585bae
Daniel Stenberg [Thu, 30 Sep 2010 22:03:17 +0000 (00:03 +0200)]
RELEASE-NOTES: synced up to 588402585bae

14 years agoTODO-RELEASE: move new features to next release
Daniel Stenberg [Thu, 30 Sep 2010 21:58:01 +0000 (23:58 +0200)]
TODO-RELEASE: move new features to next release

14 years agoREADME.ares: we know require c-ares 1.6.0
Daniel Stenberg [Thu, 30 Sep 2010 21:14:58 +0000 (23:14 +0200)]
README.ares: we know require c-ares 1.6.0

14 years agoSFTP: avoid downloading negative sizes!
Daniel Stenberg [Thu, 30 Sep 2010 21:08:37 +0000 (23:08 +0200)]
SFTP: avoid downloading negative sizes!

It is still not clarified exactly why this happens, but libssh2
sometimes report a negative file size for the remote SFTP file and that
deeply confuses libcurl (or crashes it) so this precaution is added to
avoid badness.

Reported by: Ernest Beinrohr
Bug: http://curl.haxx.se/bug/view.cgi?id=3076430

14 years agoTODO-RELEASE: drop curl_easy_setoptv
Daniel Stenberg [Thu, 30 Sep 2010 21:07:20 +0000 (23:07 +0200)]
TODO-RELEASE: drop curl_easy_setoptv

I haven't read any really convincing arguments for adding it

14 years agomulti & hiper examples: updates and cleanups
Dirk Manske [Thu, 30 Sep 2010 09:33:33 +0000 (11:33 +0200)]
multi & hiper examples: updates and cleanups

all multi and hiper examples:

* don't loop curl_multi_perform calls, that was <7.20.0 style, currently
  the exported multi functions will not return CURLM_CALL_MULTI_PERFORM

all hiper examples:
* renamed check_run_count to check_multi_info
* don't  compare current running handle count with previous value, this
  was the wrong way to check for finished requests, simply call
  curl_multi_info_read
* it's also safe to call curl_multi_remove_handle inside the
  curl_multi_info_read loop.

ghiper.c:
* replaced curl_multi_socket (that function is marked as obsolete) calls
  with curl_multi_socket_action calls (as in hiperfifo.c and
  evhiperfifo.c)

ghiper.c and evhiperfifo.c:
* be smart as hiperfifo.c, don't do uncessary curl_multi_* calls in
  new_conn and main

14 years agoTODO-RELEASE: one fixed, one postponed, one added
Daniel Stenberg [Tue, 28 Sep 2010 22:18:05 +0000 (00:18 +0200)]
TODO-RELEASE: one fixed, one postponed, one added

As we're already in feature freeze, I pushed the feature onwards.

14 years agoRenamed test1204 to test1117 to move it into the normal range
Dan Fandrich [Wed, 29 Sep 2010 20:02:37 +0000 (13:02 -0700)]
Renamed test1204 to test1117 to move it into the normal range

14 years agoAdd gopher protocol definition to ILE/RPG binding.
Patrick Monnerat [Wed, 29 Sep 2010 14:56:57 +0000 (16:56 +0200)]
Add gopher protocol definition to ILE/RPG binding.
OS400 compile script in test dir updated for chkhostname.

14 years agokrb5-gssapi: Remove several memory leaks.
Julien Chaffraix [Mon, 27 Sep 2010 05:44:42 +0000 (22:44 -0700)]
krb5-gssapi: Remove several memory leaks.

Remove a leak seen on Kerberos/MIT (gss_OID is copied internally and
we were leaking it). Now we just pass NULL as advised in RFC2744.

|tmp| was never set back to buf->data.

Cleaned up Curl_sec_end to take into account failure in Curl_sec_login
(where conn->mech would be NULL but not conn->app_data or
conn->in_buffer->data).

14 years agosecurity.c: Remove Curl_sec_fflush_fd.
Julien Chaffraix [Mon, 27 Sep 2010 05:35:00 +0000 (22:35 -0700)]
security.c: Remove Curl_sec_fflush_fd.

The current implementation would make us send wrong data on a closed
socket. We don't buffer our data so the method can be safely removed.

14 years agosecurity.c: We should always register the socket handler.
Julien Chaffraix [Mon, 27 Sep 2010 02:16:38 +0000 (19:16 -0700)]
security.c: We should always register the socket handler.

Following a change in the way socket handler are registered, the custom
recv and send method were conditionaly registered.
We need to register them everytime to handle the ftp security
extensions.

Re-added the clear text handling in sec_recv.

14 years agosecurity.c: Fix Curl_sec_login after rewrite.
Julien Chaffraix [Mon, 27 Sep 2010 02:14:50 +0000 (19:14 -0700)]
security.c: Fix Curl_sec_login after rewrite.

Curl_sec_login was returning the opposite result that the code in ftp.c
was expecting. Simplified the return code (using a CURLcode) so to see
more clearly what is going on.

14 years agosecurity.c: Readd the '\n' to the infof() calls.
Julien Chaffraix [Mon, 27 Sep 2010 01:04:48 +0000 (18:04 -0700)]
security.c: Readd the '\n' to the infof() calls.

They are not automatically added and make the output of the verbose
mode a lot more readable.

14 years agosecurity.c: Fix typo (PSBZ -> PBSZ)
Julien Chaffraix [Mon, 27 Sep 2010 00:57:03 +0000 (17:57 -0700)]
security.c: Fix typo (PSBZ -> PBSZ)

14 years agosecurity.c: Fix ftp_send_command.
Julien Chaffraix [Sun, 26 Sep 2010 23:17:01 +0000 (16:17 -0700)]
security.c: Fix ftp_send_command.

My use of va_args was completely wrong. Fixed the usage so that
we send the right commands!

14 years agocurl_easy_escape: don't escape "unreserved" characters
Daniel Stenberg [Tue, 28 Sep 2010 21:46:14 +0000 (23:46 +0200)]
curl_easy_escape: don't escape "unreserved" characters

According to RFC3986 section 2.3 the letters -, ., _ and ~ should not be
percent-encoded.

Reported by: Miguel Diaz
Bug: http://curl.haxx.se/mail/lib-2010-09/0227.html

14 years agomulti: don't expire timeouts at disonnect or done
Daniel Stenberg [Tue, 28 Sep 2010 21:17:34 +0000 (23:17 +0200)]
multi: don't expire timeouts at disonnect or done

The functions Curl_disconnect() and Curl_done() are both used within the
scope of a single request so they cannot be allowed to use
Curl_expire(... 0) to kill all timeouts as there are some timeouts that
are set before a request that are supposed to remain until the request
is done.

The timeouts are now instead cleared at curl_easy_cleanup() and when the
multi state machine changes a handle to the complete state.

14 years agoChanged the TPF make file to get source files from Makefile.inc
Dan Fandrich [Tue, 28 Sep 2010 00:47:00 +0000 (17:47 -0700)]
Changed the TPF make file to get source files from Makefile.inc

Patch was fixed and validated by David McCreedy.

14 years agoAdded test case 1204 to test HTTP range failure
Dan Fandrich [Mon, 27 Sep 2010 23:44:12 +0000 (16:44 -0700)]
Added test case 1204 to test HTTP range failure

This is an attempt to reproduce bug #3076808

14 years agomulti_runsingle: set timeout error messages
Dirk Manske [Mon, 20 Sep 2010 11:58:51 +0000 (13:58 +0200)]
multi_runsingle: set timeout error messages

With the latest changes to fix the timeout handling with multi interface
we lost the timeout error messages. This patch brings them back.

14 years agoTODO-RELEASE: updated list of issues to work on
Daniel Stenberg [Mon, 27 Sep 2010 16:25:33 +0000 (18:25 +0200)]
TODO-RELEASE: updated list of issues to work on

14 years agoparsedate: allow time specified without seconds
Daniel Stenberg [Mon, 27 Sep 2010 14:54:02 +0000 (16:54 +0200)]
parsedate: allow time specified without seconds

The date format in RFC822 allows that the seconds part of HH:MM:SS is
left out, but this function didn't allow it. This change also includes a
modified test case that makes sure that this now works.

Reported by: Matt Ford
Bug: http://curl.haxx.se/bug/view.cgi?id=3076529

14 years agoTFTP: re-indented the source code
Daniel Stenberg [Sun, 26 Sep 2010 21:38:00 +0000 (23:38 +0200)]
TFTP: re-indented the source code

Just made sure that the good old curl indentation style is used all over
this file.

14 years agoTFTP: Work around tftpd-hpa upload bug
Tim Newsome [Fri, 24 Sep 2010 16:43:49 +0000 (09:43 -0700)]
TFTP: Work around tftpd-hpa upload bug

tftpd-hpa has a bug where it will send an incorrect ack when the block
counter wraps and tftp options have been sent. Work around that by
accepting an ack for 65535 when we're expecting one for 0.

14 years agoRevert "security.c: buffer_read various fixes."
Daniel Stenberg [Thu, 23 Sep 2010 22:20:02 +0000 (00:20 +0200)]
Revert "security.c: buffer_read various fixes."

This reverts commit fbb38de415b7bb7d743e53a7b4b887ffb12b3e5b.

14 years agosecurity.c: removed superfluous parentheses
Daniel Stenberg [Wed, 22 Sep 2010 21:41:28 +0000 (23:41 +0200)]
security.c: removed superfluous parentheses

And also removed the FIXME where memory was zeroed just before freed,
and some other minor whitespace changes.

14 years agosecurity.c: Update the #include statements after the rewrite.
Julien Chaffraix [Mon, 13 Sep 2010 00:22:04 +0000 (17:22 -0700)]
security.c: Update the #include statements after the rewrite.

14 years agosecurity.c: sec_write tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:46:09 +0000 (16:46 -0700)]
security.c: sec_write tweaks

- |fd| is now a curl_socket_t and |len| a size_t to avoid conversions.
- Added 2 FIXMEs about the 2 unsigned -> signed conversions.
- Included 2 minor changes to Curl_sec_end.

14 years agosecurity.c: _sec_send tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:41:45 +0000 (16:41 -0700)]
security.c: _sec_send tweaks

- Renamed the method to sec_send now that we
  renamed sec_send to do_sec_send.
- Some more variable renaming.

14 years agosecurity.c: sec_read tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:38:38 +0000 (16:38 -0700)]
security.c: sec_read tweaks

- Renamed the function to sec_recv.
- Renamed the parameters and variable to match the rest of the code.

14 years agosecurity.c: Curl_sec_fflush_fd tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:32:41 +0000 (16:32 -0700)]
security.c: Curl_sec_fflush_fd tweaks

- Use an early return as it makes the code more readable.
- Added a FIXME about a conversion.

14 years agosecurity.c: sec_send tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:25:05 +0000 (16:25 -0700)]
security.c: sec_send tweaks

- Renamed it to do_sec_send as it is the function doing the actual
  transfer.
- Do not return any values as no one was checking it and it never
  reported a failure (added a FIXME about checking for errors).
- Renamed the variables to make their use more specific.
- Removed some casts (int -> curl_socket_t, ...)
- Avoid doing the htnl <-> nthl twice by caching the 2 results.

14 years agosecurity.c: Curl_sec_read_msg tweaks
Julien Chaffraix [Sun, 12 Sep 2010 23:08:52 +0000 (16:08 -0700)]
security.c: Curl_sec_read_msg tweaks

- Renamed the variables name to better match their intend.
- Unified the |decoded_len| checks.
- Added some FIXMEs to flag some improvement that did not go in this
  change.

14 years agosecurity.c: Curl_sec_set_protection_level tweaking
Julien Chaffraix [Sun, 12 Sep 2010 22:41:44 +0000 (15:41 -0700)]
security.c: Curl_sec_set_protection_level tweaking

- Removed sec_prot_internal as it is now inlined in the function (this removed
  a redundant check).
- Changed the prototype to return an error code.
- Updated the method to use the new ftp_send_command function.
- Added a level_to_char helper method to avoid relying on the compiler's
  bound checks. This default to the maximum security we have in case of a
  wrong input.

14 years agosecurity.c: factored the logic from Curl_sec_login into a dedicated method that bette...
Julien Chaffraix [Sat, 11 Sep 2010 19:20:04 +0000 (12:20 -0700)]
security.c: factored the logic from Curl_sec_login into a dedicated method that better reflect its intent.

Introduced a helper method ftp_send_command that synchronously send
an FTP query.

14 years agosecurity.c: Remove out_buffer as it was never written into.
Julien Chaffraix [Fri, 10 Sep 2010 07:26:37 +0000 (00:26 -0700)]
security.c: Remove out_buffer as it was never written into.

14 years agosecurity.c: buffer_read various fixes.
Julien Chaffraix [Fri, 10 Sep 2010 07:22:40 +0000 (00:22 -0700)]
security.c: buffer_read various fixes.

Tighten the type of the |data| parameter to avoid a cast. Also made
it const as we should not modify it.

Added a DEBUGASSERT on the size to be written while changing it.

14 years agosecurity.c: Made block_write return a CURLcode.
Julien Chaffraix [Fri, 10 Sep 2010 07:17:17 +0000 (00:17 -0700)]
security.c: Made block_write return a CURLcode.

While doing so, renamed it to socket_write to better match its
function.

14 years agosecurity.c: Made block_read and sec_get_data return CURLcode.
Julien Chaffraix [Fri, 10 Sep 2010 07:07:09 +0000 (00:07 -0700)]
security.c: Made block_read and sec_get_data return CURLcode.

To do so, made block_read call Curl_read_plain instead of read.

While changing them renamed block_read to socket_read and sec_get_data
to read_data to better match their function.

Also fixed a potential memory leak in block_read.

14 years agoSecurity.c: Fix headers guard to match the rest of the code.
Julien Chaffraix [Fri, 10 Sep 2010 06:52:49 +0000 (23:52 -0700)]
Security.c: Fix headers guard to match the rest of the code.

14 years agoconfigure: Fix the LDAPS disable message
Julien Chaffraix [Tue, 21 Sep 2010 05:27:11 +0000 (22:27 -0700)]
configure: Fix the LDAPS disable message

... for example when LDAP is not compiled.

Fixed the logic to match the rest of the options' message that is we
update the default message only if the option is not disabled after the
different checks.

Reported by: Guenter Knauf

14 years agoRELEASE-NOTES: sync with 8665d4e5 and c-ares >= 1.6.0 note
Daniel Stenberg [Tue, 21 Sep 2010 20:29:21 +0000 (22:29 +0200)]
RELEASE-NOTES: sync with 8665d4e5 and c-ares >= 1.6.0 note

14 years agoparse_remote_port: ignore colons without port number
Daniel Stenberg [Tue, 21 Sep 2010 17:51:30 +0000 (19:51 +0200)]
parse_remote_port: ignore colons without port number

Obviously, browsers ignore a colon without a following port number. Both
Firefox and Chrome just removes the colon for such URLs. This change
does not remove the colon for URLs sent over a HTTP proxy, so we should
consider doing that change as well.

Reported by: github user 'kreshano'

14 years agoRELEASE-NOTES: in sync with 19f45eaa799
Daniel Stenberg [Tue, 21 Sep 2010 14:53:30 +0000 (16:53 +0200)]
RELEASE-NOTES: in sync with 19f45eaa799

14 years agoduphandle: use ares_dup()
Daniel Stenberg [Tue, 21 Sep 2010 14:41:14 +0000 (16:41 +0200)]
duphandle: use ares_dup()

curl_easy_duphandle() was not properly duping the ares channel. The
ares_dup() function was introduced in c-ares 1.6.0 so by starting to use
this function we also raise the bar and require c-ares >= 1.6.0
(released Dec 9, 2008) for such builds.

Reported by: Ning Dong
Bug: http://curl.haxx.se/mail/lib-2010-08/0318.html

14 years agoMacOSX-Framework: updates for Snowleopard
Hendrik Visage [Mon, 20 Sep 2010 22:07:45 +0000 (00:07 +0200)]
MacOSX-Framework: updates for Snowleopard

1) PPC64 appears to be an 10.5 only supported architecture, so I
forced 10.5 for 64bit if there is a need for PPC64, else 64bit only
does x86_64

2) proper "make clean" after every ./configure. fixes a bug where
subsequent runs the 32bit do not get compiled

3) Added a version numbering curl-$VERSION} rather than the "stock standard" A

14 years agoRELEASE-NOTES: synced with 5fcc4332d62fe
Daniel Stenberg [Mon, 20 Sep 2010 22:02:10 +0000 (00:02 +0200)]
RELEASE-NOTES: synced with 5fcc4332d62fe

Removed the duplicate entry of Kamil in the credits.

14 years agoconfigure: don't enable RTMP if the lib detect fails
Daniel Stenberg [Mon, 20 Sep 2010 21:20:36 +0000 (23:20 +0200)]
configure: don't enable RTMP if the lib detect fails

librtmp is often statically linked and using sub dependencies like
OpenSSL, so we need to make sure we can actually link with it properly
before enabling it. Otherwise we easily end up trying to link with a
RTMP lib that fails.

14 years agoTODO: added 8.4 non-gcrypt under GnuTLS
Daniel Stenberg [Mon, 20 Sep 2010 21:19:51 +0000 (23:19 +0200)]
TODO: added 8.4 non-gcrypt under GnuTLS

We must not assume gcrypt just because of GnuTLS

14 years agoconfigure: check for gcrypt if using GnuTLS
Daniel Stenberg [Mon, 20 Sep 2010 21:05:23 +0000 (23:05 +0200)]
configure: check for gcrypt if using GnuTLS

1 - libcurl assumes that there are gcrypt functions available when
GnuTLS is.

2 - GnuTLS can be built to use libnettle instead as crypto library,
which breaks assumption (1)

This change makes configure make sure that if GnuTLS is requested and
detected, it also makes sure that gcrypt is present or it errors
out. This is mostly a way to make the user more aware of this flaw, the
correct fix would be to detect which crypto layer that is in use and
adapt our code to use that instead of blindly assuming gcrypt.

Reported by: Michal Gorny
Bug: http://curl.haxx.se/bug/view.cgi?id=3071038

14 years agoRELEASE-NOTES: sync from d2a7fd2fe65b to HEAD
Daniel Stenberg [Sat, 18 Sep 2010 21:16:07 +0000 (23:16 +0200)]
RELEASE-NOTES: sync from d2a7fd2fe65b to HEAD