~ubuntu-branches/ubuntu/lucid/curl/lucid-201101212007

« back to all changes in this revision

Viewing changes to lib/urldata.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2008-02-08 11:20:41 UTC
  • mto: (3.1.1 lenny) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080208112041-hed7sb5r6ghmjf8v
Tags: upstream-7.18.0
ImportĀ upstreamĀ versionĀ 7.18.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 *                            | (__| |_| |  _ <| |___
8
8
 *                             \___|\___/|_| \_\_____|
9
9
 *
10
 
 * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
 
10
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
11
11
 *
12
12
 * This software is licensed as described in the file COPYING, which
13
13
 * you should have received as part of this distribution. The terms
20
20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
21
 * KIND, either express or implied.
22
22
 *
23
 
 * $Id: urldata.h,v 1.354 2007-10-24 21:09:59 bagder Exp $
 
23
 * $Id: urldata.h,v 1.372 2008-01-21 23:48:58 bagder Exp $
24
24
 ***************************************************************************/
25
25
 
26
26
/* This file is for lib internal stuff */
73
73
#include "ssl.h"
74
74
#include "err.h"
75
75
#endif /* USE_OPENSSL */
 
76
#ifdef USE_GNUTLS
 
77
#error Configuration error; cannot use GnuTLS *and* OpenSSL.
 
78
#endif
76
79
#endif /* USE_SSLEAY */
77
80
 
78
81
#ifdef USE_GNUTLS
431
434
typedef enum {
432
435
  SSH_NO_STATE = -1,  /* Used for "nextState" so say there is none */
433
436
  SSH_STOP = 0,       /* do nothing state, stops the state machine */
434
 
  SSH_S_STARTUP,      /* Session startup */
 
437
 
 
438
  SSH_S_STARTUP,      /* Session startup, First state in SSH-CONNECT */
435
439
  SSH_AUTHLIST,
436
440
  SSH_AUTH_PKEY_INIT,
437
441
  SSH_AUTH_PKEY,
443
447
  SSH_AUTH_KEY,
444
448
  SSH_AUTH_DONE,
445
449
  SSH_SFTP_INIT,
446
 
  SSH_SFTP_REALPATH,
447
 
  SSH_GET_WORKINGPATH,
448
 
  SSH_SFTP_QUOTE_INIT,
449
 
  SSH_SFTP_POSTQUOTE_INIT,
 
450
  SSH_SFTP_REALPATH,   /* Last state in SSH-CONNECT */
 
451
 
 
452
  SSH_SFTP_QUOTE_INIT, /* First state in SFTP-DO */
 
453
  SSH_SFTP_POSTQUOTE_INIT, /* (Possibly) First state in SFTP-DONE */
450
454
  SSH_SFTP_QUOTE,
451
455
  SSH_SFTP_NEXT_QUOTE,
452
456
  SSH_SFTP_QUOTE_STAT,
467
471
  SSH_SFTP_READDIR_BOTTOM,
468
472
  SSH_SFTP_READDIR_DONE,
469
473
  SSH_SFTP_DOWNLOAD_INIT,
470
 
  SSH_SFTP_DOWNLOAD_STAT,
471
 
  SSH_SFTP_CLOSE,
472
 
  SSH_SFTP_SHUTDOWN,
473
 
  SSH_SCP_TRANS_INIT,
 
474
  SSH_SFTP_DOWNLOAD_STAT, /* Last state in SFTP-DO */
 
475
  SSH_SFTP_CLOSE,    /* Last state in SFTP-DONE */
 
476
  SSH_SFTP_SHUTDOWN, /* First state in SFTP-DISCONNECT */
 
477
  SSH_SCP_TRANS_INIT, /* First state in SCP-DO */
474
478
  SSH_SCP_UPLOAD_INIT,
475
479
  SSH_SCP_DOWNLOAD_INIT,
476
480
  SSH_SCP_DONE,
477
481
  SSH_SCP_SEND_EOF,
478
482
  SSH_SCP_WAIT_EOF,
479
483
  SSH_SCP_WAIT_CLOSE,
480
 
  SSH_SCP_CHANNEL_FREE,
481
 
  SSH_CHANNEL_CLOSE,
482
 
  SSH_SESSION_DISCONECT,
483
 
  SSH_SESSION_FREE,
 
484
  SSH_SCP_CHANNEL_FREE,   /* Last state in SCP-DONE */
 
485
  SSH_SESSION_DISCONNECT, /* First state in SCP-DISCONNECT */
 
486
  SSH_SESSION_FREE,       /* Last state in SCP/SFTP-DISCONNECT */
484
487
  SSH_QUIT,
485
488
  SSH_LAST  /* never used */
486
489
} sshstate;
487
490
 
 
491
/* this struct is used in the HandleData struct which is part of the
 
492
   SessionHandle, which means this is used on a per-easy handle basis.
 
493
   Everything that is strictly related to a connection is banned from this
 
494
   struct. */
488
495
struct SSHPROTO {
489
 
  curl_off_t *bytecountp;
490
 
  char *user;
491
 
  char *passwd;
492
496
  char *path;                   /* the path we operate on */
493
 
  char *homedir;
494
 
  char *errorstr;
495
 
#ifdef USE_LIBSSH2
496
 
  LIBSSH2_SESSION       *ssh_session;  /* Secure Shell session */
497
 
  LIBSSH2_CHANNEL       *ssh_channel;  /* Secure Shell channel handle */
498
 
  LIBSSH2_SFTP          *sftp_session; /* SFTP handle */
499
 
  LIBSSH2_SFTP_HANDLE   *sftp_handle;
500
 
#endif /* USE_LIBSSH2 */
501
497
};
502
498
 
503
499
/* ssh_conn is used for struct connection-oriented data in the connectdata
504
500
   struct */
505
501
struct ssh_conn {
506
 
  const char *authlist; /* List of auth. methods, managed by libssh2 */
 
502
  const char *authlist;       /* List of auth. methods, managed by libssh2 */
507
503
#ifdef USE_LIBSSH2
508
 
  const char *passphrase;
509
 
  char *rsa_pub;
510
 
  char *rsa;
511
 
  bool authed;
512
 
  sshstate state; /* always use ssh.c:state() to change state! */
513
 
  sshstate nextState; /* the state to goto after stopping */
514
 
  CURLcode actualCode;  /* the actual error code */
515
 
  struct curl_slist *quote_item;
516
 
  char *quote_path1;
 
504
  const char *passphrase;     /* passphrase to use */
 
505
  char *rsa_pub;              /* path name */
 
506
  char *rsa;                  /* path name */
 
507
  bool authed;                /* the connection has been authenticated fine */
 
508
  sshstate state;             /* always use ssh.c:state() to change state! */
 
509
  sshstate nextstate;         /* the state to goto after stopping */
 
510
  CURLcode actualcode;        /* the actual error code */
 
511
  struct curl_slist *quote_item; /* for the quote option */
 
512
  char *quote_path1;          /* two generic pointers for the QUOTE stuff */
517
513
  char *quote_path2;
518
 
  LIBSSH2_SFTP_ATTRIBUTES quote_attrs;
 
514
  LIBSSH2_SFTP_ATTRIBUTES quote_attrs; /* used by the SFTP_QUOTE state */
 
515
  char *homedir;              /* when doing SFTP we figure out home dir in the
 
516
                                 connect phase */
 
517
 
 
518
  /* Here's a set of struct members used by the SFTP_READDIR state */
519
519
  LIBSSH2_SFTP_ATTRIBUTES readdir_attrs;
520
520
  char *readdir_filename;
521
521
  char *readdir_longentry;
522
522
  int readdir_len, readdir_totalLen, readdir_currLen;
523
523
  char *readdir_line;
524
524
  char *readdir_linkPath;
525
 
  int secondCreateDirs;
526
 
  char *slash_pos;
 
525
  /* end of READDIR stuff */
 
526
 
 
527
  int secondCreateDirs;         /* counter use by the code to see if the
 
528
                                   second attempt has been made to change
 
529
                                   to/create a directory */
 
530
  char *slash_pos;              /* used by the SFTP_CREATE_DIRS state */
 
531
  LIBSSH2_SESSION *ssh_session; /* Secure Shell session */
 
532
  LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */
 
533
  LIBSSH2_SFTP *sftp_session;   /* SFTP handle */
 
534
  LIBSSH2_SFTP_HANDLE *sftp_handle;
527
535
#endif /* USE_LIBSSH2 */
528
536
};
529
537
 
595
603
                         requests */
596
604
  bool netrc;         /* name+password provided by netrc */
597
605
 
598
 
  bool trailerHdrPresent; /* Set when Trailer: header found in HTTP response.
 
606
  bool trailerhdrpresent; /* Set when Trailer: header found in HTTP response.
599
607
                             Required to determine whether to look for trailers
600
608
                             in case of Transfer-Encoding: chunking */
601
609
  bool done;          /* set to FALSE when Curl_do() is called and set to TRUE
624
632
 */
625
633
 
626
634
#define KEEP_NONE  0
627
 
#define KEEP_READ  1      /* there is or may be data to read */
628
 
#define KEEP_WRITE 2      /* there is or may be data to write */
629
 
#define KEEP_READ_HOLD 4  /* when set, no reading should be done but there
630
 
                             might still be data to read */
631
 
#define KEEP_WRITE_HOLD 8 /* when set, no writing should be done but there
632
 
                             might still be data to write */
 
635
#define KEEP_READ  (1<<0)     /* there is or may be data to read */
 
636
#define KEEP_WRITE (1<<1)     /* there is or may be data to write */
 
637
#define KEEP_READ_HOLD (1<<2) /* when set, no reading should be done but there
 
638
                                 might still be data to read */
 
639
#define KEEP_WRITE_HOLD (1<<3) /* when set, no writing should be done but there
 
640
                                  might still be data to write */
 
641
#define KEEP_READ_PAUSE (1<<4) /* reading is paused */
 
642
#define KEEP_WRITE_PAUSE (1<<5) /* writing is paused */
 
643
 
 
644
#define KEEP_READBITS (KEEP_READ | KEEP_READ_HOLD | KEEP_READ_PAUSE)
 
645
#define KEEP_WRITEBITS (KEEP_WRITE | KEEP_WRITE_HOLD | KEEP_WRITE_PAUSE)
 
646
 
633
647
 
634
648
#ifdef HAVE_LIBZ
635
649
typedef enum {
641
655
} zlibInitState;
642
656
#endif
643
657
 
 
658
#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME) || \
 
659
    defined(USE_THREADING_GETADDRINFO)
 
660
struct Curl_async {
 
661
  char *hostname;
 
662
  int port;
 
663
  struct Curl_dns_entry *dns;
 
664
  bool done;  /* set TRUE when the lookup is complete */
 
665
  int status; /* if done is TRUE, this is the status from the callback */
 
666
  void *os_specific;  /* 'struct thread_data' for Windows */
 
667
};
 
668
#endif
 
669
 
 
670
#define FIRSTSOCKET     0
 
671
#define SECONDARYSOCKET 1
 
672
 
 
673
/* These function pointer types are here only to allow easier typecasting
 
674
   within the source when we need to cast between data pointers (such as NULL)
 
675
   and function pointers. */
 
676
typedef CURLcode (*Curl_do_more_func)(struct connectdata *);
 
677
typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
 
678
 
 
679
 
644
680
/*
645
 
 * This struct is all the previously local variables from Curl_perform() moved
646
 
 * to struct to allow the function to return and get re-invoked better without
647
 
 * losing state.
 
681
 * Request specific data in the easy handle (SessionHandle).  Previously,
 
682
 * these members were on the connectdata struct but since a conn struct may
 
683
 * now be shared between different SessionHandles, we store connection-specifc
 
684
 * data here. This struct only keeps stuff that's interesting for *this*
 
685
 * request, as it will be cleared between multiple ones
648
686
 */
649
 
 
650
 
struct Curl_transfer_keeper {
651
 
 
652
 
  /** Values copied over from the HandleData struct each time on init **/
653
 
 
 
687
struct SingleRequest {
654
688
  curl_off_t size;        /* -1 if unknown at this point */
655
689
  curl_off_t *bytecountp; /* return number of bytes read or NULL */
656
690
 
658
692
                             -1 means unlimited */
659
693
  curl_off_t *writebytecountp; /* return number of bytes written or NULL */
660
694
 
661
 
  /** End of HandleData struct copies **/
662
 
 
663
695
  curl_off_t bytecount;         /* total number of bytes read */
664
696
  curl_off_t writebytecount;    /* number of bytes written */
665
697
 
666
 
  long headerbytecount;  /* only count received headers */
 
698
  long headerbytecount;         /* only count received headers */
667
699
  long deductheadercount; /* this amount of bytes doesn't count when we check
668
 
                          if anything has been transfered at the end of
669
 
                          a connection. We use this counter to make only
670
 
                          a 100 reply (without a following second response
671
 
                          code) result in a CURLE_GOT_NOTHING error code */
 
700
                             if anything has been transfered at the end of a
 
701
                             connection. We use this counter to make only a
 
702
                             100 reply (without a following second response
 
703
                             code) result in a CURLE_GOT_NOTHING error code */
672
704
 
673
705
  struct timeval start;         /* transfer started at this time */
674
706
  struct timeval now;           /* current time */
728
760
  bool ignorebody;  /* we read a response-body but we ignore it! */
729
761
  bool ignorecl;    /* This HTTP response has no body so we ignore the Content-
730
762
                       Length: header */
731
 
};
732
 
 
733
 
#if defined(USE_ARES) || defined(USE_THREADING_GETHOSTBYNAME) || \
734
 
    defined(USE_THREADING_GETADDRINFO)
735
 
struct Curl_async {
736
 
  char *hostname;
737
 
  int port;
738
 
  struct Curl_dns_entry *dns;
739
 
  bool done;  /* set TRUE when the lookup is complete */
740
 
  int status; /* if done is TRUE, this is the status from the callback */
741
 
  void *os_specific;  /* 'struct thread_data' for Windows */
742
 
};
743
 
#endif
744
 
 
745
 
#define FIRSTSOCKET     0
746
 
#define SECONDARYSOCKET 1
747
 
 
748
 
/* These function pointer types are here only to allow easier typecasting
749
 
   within the source when we need to cast between data pointers (such as NULL)
750
 
   and function pointers. */
751
 
typedef CURLcode (*Curl_do_more_func)(struct connectdata *);
752
 
typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool);
753
 
 
754
 
 
755
 
/*
756
 
 * Store's request specific data in the easy handle (SessionHandle).
757
 
 * Previously, these members were on the connectdata struct but since
758
 
 * a conn struct may now be shared between different SessionHandles,
759
 
 * we store connection-specifc data here.
760
 
 *
761
 
 */
762
 
struct HandleData {
763
 
  char *pathbuffer;/* allocated buffer to store the URL's path part in */
764
 
  char *path;      /* path to use, points to somewhere within the pathbuffer
765
 
                      area */
766
763
 
767
764
  char *newurl; /* This can only be set if a Location: was in the
768
765
                   document headers */
769
766
 
770
 
  /* This struct is inited when needed */
771
 
  struct Curl_transfer_keeper keep;
772
 
 
773
767
  /* 'upload_present' is used to keep a byte counter of how much data there is
774
768
     still left in the buffer, aimed for upload. */
775
769
  ssize_t upload_present;
779
773
      and the 'upload_present' contains the number of bytes available at this
780
774
      position */
781
775
  char *upload_fromhere;
782
 
 
783
 
  curl_off_t size;        /* -1 if unknown at this point */
784
 
  curl_off_t *bytecountp; /* return number of bytes read or NULL */
785
 
 
786
 
  curl_off_t maxdownload; /* in bytes, the maximum amount of data to fetch, -1
787
 
                             means unlimited */
788
 
  curl_off_t *writebytecountp; /* return number of bytes written or NULL */
789
 
 
790
 
  bool use_range;
791
 
  bool rangestringalloc; /* the range string is malloc()'ed */
792
 
 
793
 
  char *range; /* range, if used. See README for detailed specification on
794
 
                  this syntax. */
795
 
  curl_off_t resume_from; /* continue [ftp] transfer from here */
796
 
 
797
 
  /* Protocol specific data.
798
 
   *
799
 
   *************************************************************************
800
 
   * Note that this data will be REMOVED after each request, so anything that
801
 
   * should be kept/stored on a per-connection basis and thus live for the
802
 
   * next requst on the same connection MUST be put in the connectdata struct!
803
 
   *************************************************************************/
804
 
  union {
805
 
    struct HTTP *http;
806
 
    struct HTTP *https;  /* alias, just for the sake of being more readable */
807
 
    struct FTP *ftp;
808
 
    void *tftp;        /* private for tftp.c-eyes only */
809
 
    struct FILEPROTO *file;
810
 
    void *telnet;        /* private for telnet.c-eyes only */
811
 
    void *generic;
812
 
    struct SSHPROTO *ssh;
813
 
  } proto;
814
 
  /* current user of this HandleData instance, or NULL */
815
 
  struct connectdata *current_conn;
816
776
};
817
777
 
818
778
/*
992
952
  bool writechannel_inuse; /* whether the write channel is in use by an easy
993
953
                              handle */
994
954
  bool is_in_pipeline;     /* TRUE if this connection is in a pipeline */
 
955
  bool server_supports_pipelining; /* TRUE if server supports pipelining,
 
956
                                      set after first response */
995
957
 
996
958
  struct curl_llist *send_pipe; /* List of handles waiting to
997
959
                                   send on this pipeline */
998
960
  struct curl_llist *recv_pipe; /* List of handles waiting to read
999
961
                                   their responses on this pipeline */
 
962
  struct curl_llist *pend_pipe; /* List of pending handles on
 
963
                                   this pipeline */
 
964
#define MAX_PIPELINE_LENGTH 5
1000
965
 
1001
966
  char* master_buffer; /* The master buffer allocated on-demand;
1002
967
                          used for pipelining. */
1004
969
  size_t buf_len; /* Length of the buffer?? */
1005
970
 
1006
971
 
 
972
  curl_seek_callback seek_func; /* function that seeks the input */
 
973
  void *seek_client;            /* pointer to pass to the seek() above */
 
974
 
1007
975
  /*************** Request - specific items ************/
1008
976
 
1009
977
  /* previously this was in the urldata struct */
1175
1143
                       following not keep sending user+password... This is
1176
1144
                       strdup() data.
1177
1145
                    */
1178
 
 
1179
1146
  struct curl_ssl_session *session; /* array of 'numsessions' size */
1180
1147
  long sessionage;                  /* number of the most recent session */
1181
 
 
 
1148
  char *tempwrite;      /* allocated buffer to keep data in when a write
 
1149
                           callback returns to make the connection paused */
 
1150
  size_t tempwritesize; /* size of the 'tempwrite' allocated buffer */
 
1151
  int tempwritetype;    /* type of the 'tempwrite' buffer as a bitmask that is
 
1152
                           used with Curl_client_write() */
1182
1153
  char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */
1183
1154
  bool errorbuf; /* Set to TRUE if the error buffer is already filled in.
1184
1155
                    This must be set to FALSE every time _easy_perform() is
1190
1161
#endif
1191
1162
  bool allow_port; /* Is set.use_port allowed to take effect or not. This
1192
1163
                      is always set TRUE when curl_easy_perform() is called. */
1193
 
 
1194
 
  struct digestdata digest;
1195
 
  struct digestdata proxydigest;
 
1164
  struct digestdata digest;      /* state data for host Digest auth */
 
1165
  struct digestdata proxydigest; /* state data for proxy Digest auth */
1196
1166
 
1197
1167
#ifdef HAVE_GSSAPI
1198
 
  struct negotiatedata negotiate;
 
1168
  struct negotiatedata negotiate; /* state data for host Negotiate auth */
 
1169
  struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
1199
1170
#endif
1200
1171
 
1201
 
  struct auth authhost;
1202
 
  struct auth authproxy;
 
1172
  struct auth authhost;  /* auth details for host */
 
1173
  struct auth authproxy; /* auth details for proxy */
1203
1174
 
1204
1175
  bool authproblem; /* TRUE if there's some problem authenticating */
1205
1176
 
1223
1194
 
1224
1195
  bool pipe_broke; /* TRUE if the connection we were pipelined on broke
1225
1196
                      and we need to restart from the beginning */
1226
 
  bool cancelled; /* TRUE if the request was cancelled */
1227
1197
 
1228
1198
#ifndef WIN32
1229
1199
/* do FTP line-end conversions on most platforms */
1241
1211
  bool closed; /* set to TRUE when curl_easy_cleanup() has been called on this
1242
1212
                  handle, but it is kept around as mentioned for
1243
1213
                  shared_conn */
 
1214
  char *pathbuffer;/* allocated buffer to store the URL's path part in */
 
1215
  char *path;      /* path to use, points to somewhere within the pathbuffer
 
1216
                      area */
 
1217
 
 
1218
  bool use_range;
 
1219
  bool rangestringalloc; /* the range string is malloc()'ed */
 
1220
 
 
1221
  char *range; /* range, if used. See README for detailed specification on
 
1222
                  this syntax. */
 
1223
  curl_off_t resume_from; /* continue [ftp] transfer from here */
 
1224
 
 
1225
  /* Protocol specific data.
 
1226
   *
 
1227
   *************************************************************************
 
1228
   * Note that this data will be REMOVED after each request, so anything that
 
1229
   * should be kept/stored on a per-connection basis and thus live for the
 
1230
   * next requst on the same connection MUST be put in the connectdata struct!
 
1231
   *************************************************************************/
 
1232
  union {
 
1233
    struct HTTP *http;
 
1234
    struct HTTP *https;  /* alias, just for the sake of being more readable */
 
1235
    struct FTP *ftp;
 
1236
    void *tftp;        /* private for tftp.c-eyes only */
 
1237
    struct FILEPROTO *file;
 
1238
    void *telnet;        /* private for telnet.c-eyes only */
 
1239
    void *generic;
 
1240
    struct SSHPROTO *ssh;
 
1241
  } proto;
 
1242
  /* current user of this SessionHandle instance, or NULL */
 
1243
  struct connectdata *current_conn;
1244
1244
};
1245
1245
 
1246
1246
 
1329
1329
  long followlocation; /* as in HTTP Location: */
1330
1330
  long maxredirs;    /* maximum no. of http(s) redirects to follow, set to -1
1331
1331
                        for infinity */
1332
 
  bool post301;      /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a 301 */
 
1332
  bool post301;      /* Obey RFC 2616/10.3.2 and keep POSTs as POSTs after a
 
1333
                        301 */
1333
1334
  bool free_referer; /* set TRUE if 'referer' points to a string we
1334
1335
                        allocated */
1335
1336
  void *postfields;  /* if POST, set the fields' values here */
 
1337
  curl_seek_callback seek_func;      /* function that seeks the input */
1336
1338
  curl_off_t postfieldsize; /* if POST, this might have a size to use instead
1337
1339
                               of strlen(), and then the data *may* be binary
1338
1340
                               (contain zero bytes) */
1351
1353
                                           the address and opening the socket */
1352
1354
  void* opensocket_client;
1353
1355
 
 
1356
  void *seek_client;    /* pointer to pass to the seek callback */
1354
1357
  /* the 3 curl_conv_callback functions below are used on non-ASCII hosts */
1355
1358
  /* function to convert from the network encoding: */
1356
1359
  curl_conv_callback convfromnetwork;
1389
1392
  long httpversion; /* when non-zero, a specific HTTP version requested to
1390
1393
                       be used in the library's request(s) */
1391
1394
  struct ssl_config_data ssl;  /* user defined SSL stuff */
1392
 
 
1393
1395
  curl_proxytype proxytype; /* what kind of proxy that is in use */
1394
 
 
1395
1396
  long dns_cache_timeout; /* DNS cache timeout */
1396
1397
  long buffer_size;      /* size of receive buffer to use */
1397
 
 
1398
 
  void *private_data; /* Private data */
 
1398
  void *private_data; /* application-private data */
1399
1399
 
1400
1400
  struct Curl_one_easy *one_easy; /* When adding an easy handle to a multi
1401
1401
                                     handle, an internal 'Curl_one_easy'
1405
1405
 
1406
1406
  struct curl_slist *http200aliases; /* linked list of aliases for http200 */
1407
1407
 
1408
 
  long ip_version;
 
1408
  long ip_version; /* the CURL_IPRESOLVE_* defines in the public header file
 
1409
                      0 - whatever, 1 - v2, 2 - v6 */
1409
1410
 
1410
1411
  curl_off_t max_filesize; /* Maximum file size to download */
1411
1412
 
1415
1416
   this session. They are STATIC, set by libcurl users or at least initially
1416
1417
   and they don't change during operations. */
1417
1418
 
1418
 
  bool printhost;       /* printing host name in debug info */
1419
 
  bool get_filetime;
1420
 
  bool tunnel_thru_httpproxy;
1421
 
  bool prefer_ascii;    /* ASCII rather than binary */
1422
 
  bool ftp_append;
1423
 
  bool ftp_list_only;
1424
 
  bool ftp_create_missing_dirs;
1425
 
  bool ftp_use_port;
1426
 
  bool hide_progress;
1427
 
  bool http_fail_on_error;
1428
 
  bool http_follow_location;
 
1419
  bool printhost;        /* printing host name in debug info */
 
1420
  bool get_filetime;     /* get the time and get of the remote file */
 
1421
  bool tunnel_thru_httpproxy; /* use CONNECT through a HTTP proxy */
 
1422
  bool prefer_ascii;     /* ASCII rather than binary */
 
1423
  bool ftp_append;       /* append, not overwrite, on upload */
 
1424
  bool ftp_list_only;    /* switch FTP command for listing directories */
 
1425
  bool ftp_create_missing_dirs; /* create directories that don't exist */
 
1426
  bool ftp_use_port;     /* use the FTP PORT command */
 
1427
  bool hide_progress;    /* don't use the progress meter */
 
1428
  bool http_fail_on_error;  /* fail on HTTP error codes >= 300 */
 
1429
  bool http_follow_location; /* follow HTTP redirects */
1429
1430
  bool http_disable_hostname_check_before_authentication;
1430
1431
  bool include_header;   /* include received protocol headers in data output */
1431
 
  bool http_set_referer;
 
1432
  bool http_set_referer; /* is a custom referer used */
1432
1433
  bool http_auto_referer; /* set "correct" referer when following location: */
1433
1434
  bool opt_no_body;      /* as set with CURLOPT_NO_BODY */
1434
 
  bool set_port;
1435
 
  bool upload;
 
1435
  bool set_port;         /* custom port number used */
 
1436
  bool upload;           /* upload request */
1436
1437
  enum CURL_NETRC_OPTION
1437
1438
       use_netrc;        /* defined in include/curl.h */
1438
 
  bool verbose;
 
1439
  bool verbose;          /* output verbosity */
1439
1440
  bool krb;              /* kerberos connection requested */
1440
1441
  bool reuse_forbid;     /* forbidden to be reused, close after use */
1441
1442
  bool reuse_fresh;      /* do not re-use an existing connection  */
1459
1460
                            content-encoded (chunked, compressed) */
1460
1461
  long new_file_perms;    /* Permissions to use when creating remote files */
1461
1462
  long new_directory_perms; /* Permissions to use when creating remote dirs */
1462
 
 
 
1463
  bool proxy_transfer_mode; /* set transfer mode (;type=<a|i>) when doing FTP
 
1464
                               via an HTTP proxy */
1463
1465
  char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
1464
1466
};
1465
1467
 
1492
1494
                                      in multi controlling structure to assist
1493
1495
                                      in removal. */
1494
1496
  struct Curl_share *share;    /* Share, handles global variable mutexing */
1495
 
  struct HandleData reqdata;   /* Request-specific data */
 
1497
  struct SingleRequest req;    /* Request-specific data */
1496
1498
  struct UserDefined set;      /* values set by the libcurl user */
1497
1499
  struct DynamicStatic change; /* possibly modified userdefined data */
1498
 
 
1499
 
  struct CookieInfo *cookies;  /* the cookies, read from files and servers */
 
1500
  struct CookieInfo *cookies;  /* the cookies, read from files and servers.
 
1501
                                  NOTE that the 'cookie' field in the
 
1502
                                  UserDefined struct defines if the "engine"
 
1503
                                  is to be used or not. */
1500
1504
  struct Progress progress;    /* for all the progress meter data */
1501
1505
  struct UrlState state;       /* struct for fields used for state info and
1502
1506
                                  other dynamic purposes */