annotate lib/httpcommon.h @ 207:cf4098008615

2003-7-1 Brian Masney <masneyb@gftp.org> * lib/httpcommon.h lib/rfc2068.c - more HTTP improvements. Mostly with chunked file transfers. Also fixed several memory leaks. Added more informative error messages to aid in debugging. Size parsing fixes * lib/misc.c (base64_encode) - alphabet fix (+ wasn't a valid character, it should have been /) (thanks to Holger Kiehl <Holger.Kiehl@dwd.de> for pointing this out) * lib/config_file.c lib/gftp.h - added copy function for options variables. The functions gftp_config_file_copy_text(), gftp_config_file_copy_ptr_contents() and gftp_config_file_copy_color() were added * lib/protocols.c - make sure the remote_charsets string is restored properly after it is used * src/gtk/bookmarks.c - remove memory leak comments, these are fixed now * src/gtk/transfer.c - removed start_file_transfers variable * src/gtk/misc-gtk.c src/gtk/gftp-gtk.h lib/misc.c lib/gftp.h - moved get_next_selection() to lib * acinclude.h (AC_TYPE_SOCKLEN_T) - AC_DEFINE fix (from Nathan Robertson <nathanr@nathanr.net>)
author masneyb
date Wed, 02 Jul 2003 01:44:57 +0000
parents c505d9ba9d53
children d79e2782eb1b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
1 /*****************************************************************************/
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
2 /* httpcommon.h - common data structures for RFC2068 and HTTPS */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
3 /* Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org> */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
4 /* */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
5 /* This program is free software; you can redistribute it and/or modify */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
6 /* it under the terms of the GNU General Public License as published by */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
7 /* the Free Software Foundation; either version 2 of the License, or */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
8 /* (at your option) any later version. */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
9 /* */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
10 /* This program is distributed in the hope that it will be useful, */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
13 /* GNU General Public License for more details. */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
14 /* */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
15 /* You should have received a copy of the GNU General Public License */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
16 /* along with this program; if not, write to the Free Software */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
17 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
18 /*****************************************************************************/
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
19
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
20 /* $Id$ */
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
21
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
22 typedef struct rfc2068_params_tag
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
23 {
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
24 gftp_getline_buffer * rbuf;
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
25 unsigned long read_bytes,
207
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
26 content_length;
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
27 long chunk_size;
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
28 unsigned int chunked_transfer : 1;
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
29 ssize_t (*real_read_function) ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
30 void *ptr,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
31 size_t size,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
32 int fd );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
33
207
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
34 char * extra_read_buffer;
cf4098008615 2003-7-1 Brian Masney <masneyb@gftp.org>
masneyb
parents: 168
diff changeset
35 size_t extra_read_buffer_len;
168
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
36 } rfc2068_params;
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
37
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
38 int rfc2068_get_next_file ( gftp_request * request,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
39 gftp_file * fle,
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
40 int fd );
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
41
c505d9ba9d53 2003-6-6 Brian Masney <masneyb@gftp.org>
masneyb
parents:
diff changeset
42