ethon 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. data/CHANGELOG.md +19 -2
  2. data/Gemfile +20 -1
  3. data/README.md +29 -34
  4. data/lib/ethon/curls/constants.rb +3 -1
  5. data/lib/ethon/curls/functions.rb +36 -29
  6. data/lib/ethon/curls/options.rb +211 -145
  7. data/lib/ethon/easy.rb +747 -102
  8. data/lib/ethon/{easies → easy}/callbacks.rb +1 -1
  9. data/lib/ethon/{easies → easy}/form.rb +6 -6
  10. data/lib/ethon/{easies → easy}/header.rb +1 -1
  11. data/lib/ethon/{easies → easy}/http.rb +16 -10
  12. data/lib/ethon/{easies → easy}/http/actionable.rb +3 -3
  13. data/lib/ethon/{easies → easy}/http/delete.rb +3 -3
  14. data/lib/ethon/{easies → easy}/http/get.rb +3 -3
  15. data/lib/ethon/{easies → easy}/http/head.rb +3 -3
  16. data/lib/ethon/{easies → easy}/http/options.rb +3 -3
  17. data/lib/ethon/{easies → easy}/http/patch.rb +3 -3
  18. data/lib/ethon/{easies → easy}/http/post.rb +3 -3
  19. data/lib/ethon/{easies → easy}/http/postable.rb +1 -1
  20. data/lib/ethon/{easies → easy}/http/put.rb +3 -3
  21. data/lib/ethon/{easies → easy}/http/putable.rb +1 -1
  22. data/lib/ethon/{easies → easy}/informations.rb +1 -1
  23. data/lib/ethon/{easies → easy}/operations.rb +11 -1
  24. data/lib/ethon/{easies → easy}/options.rb +6 -6
  25. data/lib/ethon/{easies → easy}/params.rb +5 -5
  26. data/lib/ethon/{easies → easy}/queryable.rb +1 -1
  27. data/lib/ethon/{easies → easy}/response_callbacks.rb +1 -1
  28. data/lib/ethon/{easies → easy}/util.rb +1 -1
  29. data/lib/ethon/multi.rb +23 -12
  30. data/lib/ethon/{multies → multi}/operations.rb +13 -1
  31. data/lib/ethon/multi/options.rb +86 -0
  32. data/lib/ethon/{multies → multi}/stack.rb +1 -1
  33. data/lib/ethon/version.rb +1 -1
  34. metadata +28 -171
data/CHANGELOG.md CHANGED
@@ -2,9 +2,26 @@
2
2
 
3
3
  ## Master
4
4
 
5
- [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.2...master)
5
+ [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.3...master)
6
6
 
7
- # Changelog
7
+ Enhancements:
8
+
9
+ Bugfixes:
10
+
11
+ ## 0.4.3
12
+
13
+ [Full Changelog](http://github.com/typhoeus/ethon/compare/v0.4.2...v0.4.3)
14
+
15
+ Enhancements:
16
+
17
+ * Remove deprecated libcurl option put
18
+ * More documentation
19
+ * New libcurl option connecttimeout_ms and timeout_ms
20
+ * Support multi options
21
+
22
+ Bugfixes:
23
+
24
+ * Handle nil values in query params
8
25
 
9
26
  ## 0.4.2
10
27
 
data/Gemfile CHANGED
@@ -1,3 +1,22 @@
1
1
  source :rubygems
2
-
3
2
  gemspec
3
+
4
+ gem "rake"
5
+
6
+ group :development, :test do
7
+ gem "rspec", "~> 2.11"
8
+
9
+ gem "sinatra", "~> 1.3"
10
+ gem "json"
11
+
12
+ if RUBY_PLATFORM == "java"
13
+ gem "spoon"
14
+ else
15
+ gem "patron", "~> 0.4"
16
+ gem "curb", "~> 0.8.0"
17
+ end
18
+
19
+ unless ENV["CI"]
20
+ gem "guard-rspec", "~> 0.7"
21
+ end
22
+ end
data/README.md CHANGED
@@ -4,6 +4,8 @@ In the greek mythology Ethon is a gigantic eagle the son of Typhoeus and Echidna
4
4
  In the modern world Ethon is a very basic libcurl wrapper using ffi.
5
5
 
6
6
  * [Documentation](http://rubydoc.info/github/typhoeus/ethon)
7
+ * [Website](http://typhoeus.github.com/)
8
+ * [Mailinglist](http://groups.google.com/group/typhoeus)
7
9
 
8
10
  ## Installation
9
11
 
@@ -19,50 +21,43 @@ With rubygems:
19
21
 
20
22
  Making the first request is realy simple:
21
23
 
22
- ```ruby
23
- easy = Ethon::Easy.new(:url => "www.google.de")
24
- easy.prepare
25
- easy.perform
26
- #=> :ok
27
- ```
24
+ easy = Ethon::Easy.new(:url => "www.google.de")
25
+ easy.prepare
26
+ easy.perform
27
+ #=> :ok
28
28
 
29
29
  You have access to various options like following redirects:
30
30
 
31
- ```ruby
32
- easy = Ethon::Easy.new(:url => "www.google.com", :follow_location => true)
33
- easy.prepare
34
- easy.perform
35
- #=> :ok
36
- ```
31
+ easy = Ethon::Easy.new(:url => "www.google.com", :follow_location => true)
32
+ easy.prepare
33
+ easy.perform
34
+ #=> :ok
35
+
37
36
  Once you're done you can look at the response code and body:
38
37
 
39
- ```ruby
40
- easy = Ethon::Easy.new(:url => "www.google.de")
41
- easy.prepare
42
- easy.perform
43
- easy.response_code
44
- #=> 200
45
- easy.response_body
46
- #=> "<!doctype html><html ..."
47
- ```
38
+ easy = Ethon::Easy.new(:url => "www.google.de")
39
+ easy.prepare
40
+ easy.perform
41
+ easy.response_code
42
+ #=> 200
43
+ easy.response_body
44
+ #=> "<!doctype html><html ..."
48
45
 
49
46
  ## Http
50
47
 
51
48
  In order to make life easier there are some helpers for doing http requests:
52
49
 
53
- ```ruby
54
- easy = Ethon::Easy.new
55
- easy.http_request("www.google.de", :get, { :params => {:a => 1} })
56
- easy.prepare
57
- easy.perform
58
- #=> :ok
59
-
60
- easy = Ethon::Easy.new
61
- easy.http_request("www.google.de", :post, { :params => { :a => 1 }, :body => { :b => 2 } })
62
- easy.prepare
63
- easy.perform
64
- #=> :ok
65
- ```
50
+ easy = Ethon::Easy.new
51
+ easy.http_request("www.google.de", :get, { :params => {:a => 1} })
52
+ easy.prepare
53
+ easy.perform
54
+ #=> :ok
55
+
56
+ easy = Ethon::Easy.new
57
+ easy.http_request("www.google.de", :post, { :params => { :a => 1 }, :body => { :b => 2 } })
58
+ easy.prepare
59
+ easy.perform
60
+ #=> :ok
66
61
 
67
62
  This really handy when doing requests since you don't have to care about setting
68
63
  everything up correct.
@@ -18,7 +18,9 @@ module Ethon
18
18
  MultiCode = enum(:multi_code, multi_codes)
19
19
 
20
20
  # :nodoc:
21
- Option = enum(:option, options.to_a.flatten)
21
+ EasyOption = enum(:easy_option, easy_options.to_a.flatten)
22
+ # :nodoc:
23
+ MultiOption = enum(:multi_option, multi_options.to_a.flatten)
22
24
  # :nodoc:
23
25
  OptionType = enum(option_types.to_a.flatten)
24
26
 
@@ -7,39 +7,46 @@ module Ethon
7
7
 
8
8
  # :nodoc:
9
9
  def self.extended(base)
10
- base.attach_function :global_init, :curl_global_init, [:long], :int
10
+ base.attach_function :global_init, :curl_global_init, [:long], :int
11
11
 
12
- base.attach_function :easy_init, :curl_easy_init, [], :pointer
13
- base.attach_function :easy_cleanup, :curl_easy_cleanup, [:pointer], :void
14
- base.attach_function :easy_getinfo, :curl_easy_getinfo, [:pointer, :info, :pointer], :easy_code
15
- base.attach_function :easy_setopt, :curl_easy_setopt, [:pointer, :option, :pointer], :easy_code
16
- base.attach_function :easy_setopt_ffipointer, :curl_easy_setopt, [:pointer, :option, :pointer], :easy_code
17
- base.attach_function :easy_setopt_string, :curl_easy_setopt, [:pointer, :option, :string], :easy_code
18
- base.attach_function :easy_setopt_long, :curl_easy_setopt, [:pointer, :option, :long], :easy_code
19
- base.attach_function :easy_setopt_fixnum, :curl_easy_setopt, [:pointer, :option, :long], :easy_code
20
- base.attach_function :easy_setopt_callback, :curl_easy_setopt, [:pointer, :option, :callback], :easy_code
21
- base.attach_function :easy_setopt_proc, :curl_easy_setopt, [:pointer, :option, :callback], :easy_code
22
- base.attach_function :easy_perform, :curl_easy_perform, [:pointer], :easy_code
23
- base.attach_function :easy_strerror, :curl_easy_strerror, [:int], :string
24
- base.attach_function :easy_escape, :curl_easy_escape, [:pointer, :pointer, :int], :string
25
- base.attach_function :easy_reset, :curl_easy_reset, [:pointer], :void
12
+ base.attach_function :easy_init, :curl_easy_init, [], :pointer
13
+ base.attach_function :easy_cleanup, :curl_easy_cleanup, [:pointer], :void
14
+ base.attach_function :easy_getinfo, :curl_easy_getinfo, [:pointer, :info, :pointer], :easy_code
15
+ base.attach_function :easy_setopt, :curl_easy_setopt, [:pointer, :easy_option, :pointer], :easy_code
16
+ base.attach_function :easy_setopt_ffipointer, :curl_easy_setopt, [:pointer, :easy_option, :pointer], :easy_code
17
+ base.attach_function :easy_setopt_string, :curl_easy_setopt, [:pointer, :easy_option, :string], :easy_code
18
+ base.attach_function :easy_setopt_long, :curl_easy_setopt, [:pointer, :easy_option, :long], :easy_code
19
+ base.attach_function :easy_setopt_fixnum, :curl_easy_setopt, [:pointer, :easy_option, :long], :easy_code
20
+ base.attach_function :easy_setopt_callback, :curl_easy_setopt, [:pointer, :easy_option, :callback], :easy_code
21
+ base.attach_function :easy_setopt_proc, :curl_easy_setopt, [:pointer, :easy_option, :callback], :easy_code
22
+ base.attach_function :easy_perform, :curl_easy_perform, [:pointer], :easy_code
23
+ base.attach_function :easy_strerror, :curl_easy_strerror, [:int], :string
24
+ base.attach_function :easy_escape, :curl_easy_escape, [:pointer, :pointer, :int], :string
25
+ base.attach_function :easy_reset, :curl_easy_reset, [:pointer], :void
26
26
 
27
- base.attach_function :formadd, :curl_formadd, [:pointer, :pointer, :varargs], :int
27
+ base.attach_function :formadd, :curl_formadd, [:pointer, :pointer, :varargs], :int
28
28
 
29
- base.attach_function :multi_init, :curl_multi_init, [], :pointer
30
- base.attach_function :multi_cleanup, :curl_multi_cleanup, [:pointer], :void
31
- base.attach_function :multi_add_handle, :curl_multi_add_handle, [:pointer, :pointer], :multi_code
32
- base.attach_function :multi_remove_handle, :curl_multi_remove_handle, [:pointer, :pointer], :multi_code
33
- base.attach_function :multi_info_read, :curl_multi_info_read, [:pointer, :pointer], Curl::Msg.ptr
34
- base.attach_function :multi_perform, :curl_multi_perform, [:pointer, :pointer], :multi_code
35
- base.attach_function :multi_timeout, :curl_multi_timeout, [:pointer, :pointer], :multi_code
36
- base.attach_function :multi_fdset, :curl_multi_fdset, [:pointer, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, :pointer], :multi_code
37
- base.attach_function :multi_strerror, :curl_multi_strerror, [:int], :string
29
+ base.attach_function :multi_init, :curl_multi_init, [], :pointer
30
+ base.attach_function :multi_cleanup, :curl_multi_cleanup, [:pointer], :void
31
+ base.attach_function :multi_add_handle, :curl_multi_add_handle, [:pointer, :pointer], :multi_code
32
+ base.attach_function :multi_remove_handle, :curl_multi_remove_handle, [:pointer, :pointer], :multi_code
33
+ base.attach_function :multi_info_read, :curl_multi_info_read, [:pointer, :pointer], Curl::Msg.ptr
34
+ base.attach_function :multi_perform, :curl_multi_perform, [:pointer, :pointer], :multi_code
35
+ base.attach_function :multi_timeout, :curl_multi_timeout, [:pointer, :pointer], :multi_code
36
+ base.attach_function :multi_fdset, :curl_multi_fdset, [:pointer, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, :pointer], :multi_code
37
+ base.attach_function :multi_strerror, :curl_multi_strerror, [:int], :string
38
+ base.attach_function :multi_setopt, :curl_multi_setopt, [:pointer, :multi_option, :pointer], :multi_code
39
+ base.attach_function :multi_setopt_ffipointer,:curl_multi_setopt, [:pointer, :multi_option, :pointer], :multi_code
40
+ base.attach_function :multi_setopt_string, :curl_multi_setopt, [:pointer, :multi_option, :string], :multi_code
41
+ base.attach_function :multi_setopt_long, :curl_multi_setopt, [:pointer, :multi_option, :long], :multi_code
42
+ base.attach_function :multi_setopt_fixnum, :curl_multi_setopt, [:pointer, :multi_option, :long], :multi_code
43
+ base.attach_function :multi_setopt_callback, :curl_multi_setopt, [:pointer, :multi_option, :callback], :multi_code
44
+ base.attach_function :multi_setopt_proc, :curl_multi_setopt, [:pointer, :multi_option, :callback], :multi_code
38
45
 
39
- base.attach_function :version, :curl_version, [], :string
40
- base.attach_function :slist_append, :curl_slist_append, [:pointer, :string], :pointer
41
- base.attach_function :slist_free_all, :curl_slist_free_all, [:pointer], :void
42
- base.attach_function :select, [:int, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::Timeval.ptr], :int
46
+ base.attach_function :version, :curl_version, [], :string
47
+ base.attach_function :slist_append, :curl_slist_append, [:pointer, :string], :pointer
48
+ base.attach_function :slist_free_all, :curl_slist_free_all, [:pointer], :void
49
+ base.attach_function :select, [:int, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::FDSet.ptr, Curl::Timeval.ptr], :int
43
50
  end
44
51
  end
45
52
  end
@@ -6,10 +6,10 @@ module Ethon
6
6
  module Options
7
7
 
8
8
  # Sets appropriate option for easy, depending on value type.
9
- def set_option(option, value, handle)
9
+ def set_option(option, value, handle, type = :easy)
10
10
  return unless value
11
11
 
12
- name = "easy_setopt_#{value.class.to_s.downcase.delete(':')}"
12
+ name = "#{type}_setopt_#{value.class.to_s.downcase.delete(':')}"
13
13
  send(name, handle, option, value)
14
14
  end
15
15
 
@@ -23,150 +23,216 @@ module Ethon
23
23
  }
24
24
  end
25
25
 
26
- # Curl options, refer
27
- # https://github.com/bagder/curl/blob/master/src/tool_cfgable.h for details
28
- def options
26
+ # Curl multi options, refer
27
+ # https://github.com/bagder/curl/blob/master/include/curl/multi.h
28
+ def multi_options
29
29
  {
30
- :file => option_types[:object_point] + 1,
31
- :writedata => option_types[:object_point] + 1,
32
- :url => option_types[:object_point] + 2,
33
- :port => option_types[:long] + 3,
34
- :proxy => option_types[:object_point] + 4,
35
- :userpwd => option_types[:object_point] + 5,
36
- :proxyuserpwd => option_types[:object_point] + 6,
37
- :range => option_types[:object_point] + 7,
38
- :infile => option_types[:object_point] + 9,
39
- :readdata => option_types[:object_point] + 9,
40
- :errorbuffer => option_types[:object_point] + 10,
41
- :writefunction => option_types[:function_point] + 11,
42
- :readfunction => option_types[:function_point] + 12,
43
- :timeout => option_types[:long] + 13,
44
- :infilesize => option_types[:long] + 14,
45
- :postfields => option_types[:object_point] + 15,
46
- :referer => option_types[:object_point] + 16,
47
- :ftpport => option_types[:object_point] + 17,
48
- :useragent => option_types[:object_point] + 18,
49
- :low_speed_time => option_types[:long] + 20,
50
- :resume_from => option_types[:long] + 21,
51
- :cookie => option_types[:object_point] + 22,
52
- :httpheader => option_types[:object_point] + 23,
53
- :httppost => option_types[:object_point] + 24,
54
- :sslcert => option_types[:object_point] + 25,
55
- :sslcertpasswd => option_types[:object_point] + 26,
56
- :sslkeypasswd => option_types[:object_point] + 26,
57
- :crlf => option_types[:long] + 27,
58
- :quote => option_types[:object_point] + 28,
59
- :writeheader => option_types[:object_point] + 29,
60
- :headerdata => option_types[:object_point] + 29,
61
- :cookiefile => option_types[:object_point] + 31,
62
- :sslversion => option_types[:long] + 32,
63
- :timecondition => option_types[:long] + 33,
64
- :timevalue => option_types[:long] + 34,
65
- :customrequest => option_types[:object_point] + 36,
66
- :stderr => option_types[:object_point] + 37,
67
- :postquote => option_types[:object_point] + 39,
68
- :writeinfo => option_types[:object_point] + 40,
69
- :verbose => option_types[:long] + 41,
70
- :header => option_types[:long] + 42,
71
- :noprogress => option_types[:long] + 43,
72
- :nobody => option_types[:long] + 44,
73
- :failonerror => option_types[:long] + 45,
74
- :upload => option_types[:long] + 46,
75
- :post => option_types[:long] + 47,
76
- :ftplistonly => option_types[:long] + 48,
77
- :ftpappend => option_types[:long] + 50,
78
- :netrc => option_types[:long] + 51,
79
- :followlocation => option_types[:long] + 52,
80
- :transfertext => option_types[:long] + 53,
81
- :put => option_types[:long] + 54,
82
- :progressfunction => option_types[:function_point] + 56,
83
- :progressdata => option_types[:object_point] + 57,
84
- :autoreferer => option_types[:long] + 58,
85
- :proxyport => option_types[:long] + 59,
86
- :postfieldsize => option_types[:long] + 60,
87
- :httpproxytunnel => option_types[:long] + 61,
88
- :interface => option_types[:object_point] + 62,
89
- :ssl_verifypeer => option_types[:long] + 64,
90
- :cainfo => option_types[:object_point] + 65,
91
- :maxredirs => option_types[:long] + 68,
92
- :filetime => option_types[:long] + 69,
93
- :telnetoptions => option_types[:object_point] + 70,
94
- :maxconnects => option_types[:long] + 71,
95
- :closepolicy => option_types[:long] + 72,
96
- :fresh_connect => option_types[:long] + 74,
97
- :forbid_reuse => option_types[:long] + 75,
98
- :random_file => option_types[:object_point] + 76,
99
- :egdsocket => option_types[:object_point] + 77,
100
- :connecttimeout => option_types[:long] + 78,
101
- :headerfunction => option_types[:function_point] + 79,
102
- :httpget => option_types[:long] + 80,
103
- :ssl_verifyhost => option_types[:long] + 81,
104
- :cookiejar => option_types[:object_point] + 82,
105
- :ssl_cipher_list => option_types[:object_point] + 83,
106
- :http_version => option_types[:long] + 84,
107
- :ftp_use_epsv => option_types[:long] + 85,
108
- :sslcerttype => option_types[:object_point] + 86,
109
- :sslkey => option_types[:object_point] + 87,
110
- :sslkeytype => option_types[:object_point] + 88,
111
- :sslengine => option_types[:object_point] + 89,
112
- :sslengine_default => option_types[:long] + 90,
113
- :dns_use_global_cache => option_types[:long] + 91,
114
- :dns_cache_timeout => option_types[:long] + 92,
115
- :prequote => option_types[:object_point] + 93,
116
- :debugfunction => option_types[:function_point] + 94,
117
- :debugdata => option_types[:object_point] + 95,
118
- :cookiesession => option_types[:long] + 96,
119
- :capath => option_types[:object_point] + 97,
120
- :buffersize => option_types[:long] + 98,
121
- :nosignal => option_types[:long] + 99,
122
- :share => option_types[:object_point] + 100,
123
- :proxytype => option_types[:long] + 101,
124
- :encoding => option_types[:object_point] + 102,
125
- :private => option_types[:object_point] + 103,
126
- :unrestricted_auth => option_types[:long] + 105,
127
- :ftp_use_eprt => option_types[:long] + 106,
128
- :httpauth => option_types[:long] + 107,
129
- :ssl_ctx_function => option_types[:function_point] + 108,
130
- :ssl_ctx_data => option_types[:object_point] + 109,
131
- :ftp_create_missing_dirs => option_types[:long] + 110,
132
- :proxyauth => option_types[:long] + 111,
133
- :ipresolve => option_types[:long] + 113,
134
- :maxfilesize => option_types[:long] + 114,
135
- :infilesize_large => option_types[:off_t] + 115,
136
- :resume_from_large => option_types[:off_t] + 116,
137
- :maxfilesize_large => option_types[:off_t] + 117,
138
- :netrc_file => option_types[:object_point] + 118,
139
- :ftp_ssl => option_types[:long] + 119,
140
- :postfieldsize_large => option_types[:off_t] + 120,
141
- :tcp_nodelay => option_types[:long] + 121,
142
- :ftpsslauth => option_types[:long] + 129,
143
- :ioctlfunction => option_types[:function_point] + 130,
144
- :ioctldata => option_types[:object_point] + 131,
145
- :ftp_account => option_types[:object_point] + 134,
146
- :cookielist => option_types[:object_point] + 135,
147
- :ignore_content_length => option_types[:long] + 136,
148
- :ftp_skip_pasv_ip => option_types[:long] + 137,
149
- :ftp_filemethod => option_types[:long] + 138,
150
- :localport => option_types[:long] + 139,
151
- :localportrange => option_types[:long] + 140,
152
- :connect_only => option_types[:long] + 141,
153
- :conv_from_network_function => option_types[:function_point] + 142,
154
- :conv_to_network_function => option_types[:function_point] + 143,
155
- :max_send_speed_large => option_types[:off_t] + 145,
156
- :max_recv_speed_large => option_types[:off_t] + 146,
157
- :ftp_alternative_to_user => option_types[:object_point] + 147,
158
- :sockoptfunction => option_types[:function_point] + 148,
159
- :sockoptdata => option_types[:object_point] + 149,
160
- :ssl_sessionid_cache => option_types[:long] + 150,
161
- :ssh_auth_types => option_types[:long] + 151,
162
- :ssh_public_keyfile => option_types[:object_point] + 152,
163
- :ssh_private_keyfile => option_types[:object_point] + 153,
164
- :ftp_ssl_ccc => option_types[:long] + 154,
165
- :timeout_ms => option_types[:long] + 155,
166
- :connecttimeout_ms => option_types[:long] + 156,
167
- :http_transfer_decoding => option_types[:long] + 157,
168
- :http_content_decoding => option_types[:long] + 158,
169
- :copypostfields => option_types[:object_point] + 165
30
+ :socketfunction => option_types[:function_point] + 1,
31
+ :socketdata => option_types[:object_point] + 2,
32
+ :pipelining => option_types[:long] + 3,
33
+ :timerfunction => option_types[:function_point] + 4,
34
+ :timerdata => option_types[:object_point] + 5,
35
+ :maxconnects => option_types[:long] + 6
36
+ }
37
+ end
38
+
39
+ # Curl easy options, refer
40
+ # https://github.com/bagder/curl/blob/master/include/curl/curl.h
41
+ def easy_options
42
+ {
43
+
44
+ :file => option_types[:object_point] + 1,
45
+ :writedata => option_types[:object_point] + 1,
46
+ :url => option_types[:object_point] + 2,
47
+ :port => option_types[:long] + 3,
48
+ :proxy => option_types[:object_point] + 4,
49
+ :userpwd => option_types[:object_point] + 5,
50
+ :proxyuserpwd => option_types[:object_point] + 6,
51
+ :range => option_types[:object_point] + 7,
52
+ :infile => option_types[:object_point] + 9,
53
+ :readdata => option_types[:object_point] + 9,
54
+ :errorbuffer => option_types[:object_point] + 10,
55
+ :writefunction => option_types[:function_point] + 11,
56
+ :readfunction => option_types[:function_point] + 12,
57
+ :timeout => option_types[:long] + 13,
58
+ :infilesize => option_types[:long] + 14,
59
+ :postfields => option_types[:object_point] + 15,
60
+ :referer => option_types[:object_point] + 16,
61
+ :ftpport => option_types[:object_point] + 17,
62
+ :useragent => option_types[:object_point] + 18,
63
+ :low_speed_time => option_types[:long] + 20,
64
+ :resume_from => option_types[:long] + 21,
65
+ :cookie => option_types[:object_point] + 22,
66
+ :httpheader => option_types[:object_point] + 23,
67
+ :httppost => option_types[:object_point] + 24,
68
+ :sslcert => option_types[:object_point] + 25,
69
+ :sslcertpasswd => option_types[:object_point] + 26,
70
+ :sslkeypasswd => option_types[:object_point] + 26,
71
+ :crlf => option_types[:long] + 27,
72
+ :quote => option_types[:object_point] + 28,
73
+ :writeheader => option_types[:object_point] + 29,
74
+ :headerdata => option_types[:object_point] + 29,
75
+ :cookiefile => option_types[:object_point] + 31,
76
+ :sslversion => option_types[:long] + 32,
77
+ :timecondition => option_types[:long] + 33,
78
+ :timevalue => option_types[:long] + 34,
79
+ :customrequest => option_types[:object_point] + 36,
80
+ :stderr => option_types[:object_point] + 37,
81
+ :postquote => option_types[:object_point] + 39,
82
+ :writeinfo => option_types[:object_point] + 40,
83
+ :verbose => option_types[:long] + 41,
84
+ :header => option_types[:long] + 42,
85
+ :noprogress => option_types[:long] + 43,
86
+ :nobody => option_types[:long] + 44,
87
+ :failonerror => option_types[:long] + 45,
88
+ :upload => option_types[:long] + 46,
89
+ :post => option_types[:long] + 47,
90
+ :ftplistonly => option_types[:long] + 48,
91
+ :ftpappend => option_types[:long] + 50,
92
+ :netrc => option_types[:long] + 51,
93
+ :followlocation => option_types[:long] + 52,
94
+ :transfertext => option_types[:long] + 53,
95
+ :put => option_types[:long] + 54,
96
+ :progressfunction => option_types[:function_point] + 56,
97
+ :progressdata => option_types[:object_point] + 57,
98
+ :autoreferer => option_types[:long] + 58,
99
+ :proxyport => option_types[:long] + 59,
100
+ :postfieldsize => option_types[:long] + 60,
101
+ :httpproxytunnel => option_types[:long] + 61,
102
+ :interface => option_types[:object_point] + 62,
103
+ :ssl_verifypeer => option_types[:long] + 64,
104
+ :cainfo => option_types[:object_point] + 65,
105
+ :maxredirs => option_types[:long] + 68,
106
+ :filetime => option_types[:long] + 69,
107
+ :telnetoptions => option_types[:object_point] + 70,
108
+ :maxconnects => option_types[:long] + 71,
109
+ :closepolicy => option_types[:long] + 72,
110
+ :fresh_connect => option_types[:long] + 74,
111
+ :forbid_reuse => option_types[:long] + 75,
112
+ :random_file => option_types[:object_point] + 76,
113
+ :egdsocket => option_types[:object_point] + 77,
114
+ :connecttimeout => option_types[:long] + 78,
115
+ :headerfunction => option_types[:function_point] + 79,
116
+ :httpget => option_types[:long] + 80,
117
+ :ssl_verifyhost => option_types[:long] + 81,
118
+ :cookiejar => option_types[:object_point] + 82,
119
+ :ssl_cipher_list => option_types[:object_point] + 83,
120
+ :http_version => option_types[:long] + 84,
121
+ :ftp_use_epsv => option_types[:long] + 85,
122
+ :sslcerttype => option_types[:object_point] + 86,
123
+ :sslkey => option_types[:object_point] + 87,
124
+ :sslkeytype => option_types[:object_point] + 88,
125
+ :sslengine => option_types[:object_point] + 89,
126
+ :sslengine_default => option_types[:long] + 90,
127
+ :dns_use_global_cache => option_types[:long] + 91,
128
+ :dns_cache_timeout => option_types[:long] + 92,
129
+ :prequote => option_types[:object_point] + 93,
130
+ :debugfunction => option_types[:function_point] + 94,
131
+ :debugdata => option_types[:object_point] + 95,
132
+ :cookiesession => option_types[:long] + 96,
133
+ :capath => option_types[:object_point] + 97,
134
+ :buffersize => option_types[:long] + 98,
135
+ :nosignal => option_types[:long] + 99,
136
+ :share => option_types[:object_point] + 100,
137
+ :proxytype => option_types[:long] + 101,
138
+ :encoding => option_types[:object_point] + 102,
139
+ :private => option_types[:object_point] + 103,
140
+ :unrestricted_auth => option_types[:long] + 105,
141
+ :ftp_use_eprt => option_types[:long] + 106,
142
+ :httpauth => option_types[:long] + 107,
143
+ :ssl_ctx_function => option_types[:function_point] + 108,
144
+ :ssl_ctx_data => option_types[:object_point] + 109,
145
+ :ftp_create_missing_dirs => option_types[:long] + 110,
146
+ :proxyauth => option_types[:long] + 111,
147
+ :ipresolve => option_types[:long] + 113,
148
+ :maxfilesize => option_types[:long] + 114,
149
+ :infilesize_large => option_types[:off_t] + 115,
150
+ :resume_from_large => option_types[:off_t] + 116,
151
+ :maxfilesize_large => option_types[:off_t] + 117,
152
+ :netrc_file => option_types[:object_point] + 118,
153
+ :ftp_ssl => option_types[:long] + 119,
154
+ :postfieldsize_large => option_types[:off_t] + 120,
155
+ :tcp_nodelay => option_types[:long] + 121,
156
+ :ftpsslauth => option_types[:long] + 129,
157
+ :ioctlfunction => option_types[:function_point] + 130,
158
+ :ioctldata => option_types[:object_point] + 131,
159
+ :ftp_account => option_types[:object_point] + 134,
160
+ :cookielist => option_types[:object_point] + 135,
161
+ :ignore_content_length => option_types[:long] + 136,
162
+ :ftp_skip_pasv_ip => option_types[:long] + 137,
163
+ :ftp_filemethod => option_types[:long] + 138,
164
+ :localport => option_types[:long] + 139,
165
+ :localportrange => option_types[:long] + 140,
166
+ :connect_only => option_types[:long] + 141,
167
+ :conv_from_network_function => option_types[:function_point] + 142,
168
+ :conv_to_network_function => option_types[:function_point] + 143,
169
+ :max_send_speed_large => option_types[:off_t] + 145,
170
+ :max_recv_speed_large => option_types[:off_t] + 146,
171
+ :ftp_alternative_to_user => option_types[:object_point] + 147,
172
+ :sockoptfunction => option_types[:function_point] + 148,
173
+ :sockoptdata => option_types[:object_point] + 149,
174
+ :ssl_sessionid_cache => option_types[:long] + 150,
175
+ :ssh_auth_types => option_types[:long] + 151,
176
+ :ssh_public_keyfile => option_types[:object_point] + 152,
177
+ :ssh_private_keyfile => option_types[:object_point] + 153,
178
+ :ftp_ssl_ccc => option_types[:long] + 154,
179
+ :timeout_ms => option_types[:long] + 155,
180
+ :connecttimeout_ms => option_types[:long] + 156,
181
+ :http_transfer_decoding => option_types[:long] + 157,
182
+ :http_content_decoding => option_types[:long] + 158,
183
+ :copypostfields => option_types[:object_point] + 165,
184
+ :proxy_transfer_mode => option_types[:long] + 166,
185
+ :seekfunction => option_types[:function_point] + 167,
186
+ :seekdata => option_types[:object_point] + 168,
187
+ :crlfile => option_types[:object_point] + 169,
188
+ :issuercert => option_types[:object_point] + 170,
189
+ :address_scope => option_types[:long] + 171,
190
+ :certinfo => option_types[:long] + 172,
191
+ :username => option_types[:object_point] + 173,
192
+ :password => option_types[:object_point] + 174,
193
+ :proxyusername => option_types[:object_point] + 175,
194
+ :proxypassword => option_types[:object_point] + 176,
195
+ :noproxy => option_types[:object_point] + 177,
196
+ :tftp_blksize => option_types[:long] + 178,
197
+ :socks5_gssapi_service => option_types[:object_point] + 179,
198
+ :socks5_gssapi_nec => option_types[:long] + 180,
199
+ :protocols => option_types[:long] + 181,
200
+ :redir_protocols => option_types[:long] + 182,
201
+ :ssh_knownhosts => option_types[:object_point] + 183,
202
+ :ssh_keyfunction => option_types[:function_point] + 184,
203
+ :ssh_keydata => option_types[:object_point] + 185,
204
+ :mail_from => option_types[:object_point] + 186,
205
+ :mail_rcpt => option_types[:object_point] + 187,
206
+ :ftp_use_pret => option_types[:long] + 188,
207
+ :rtsp_request => option_types[:long] + 189,
208
+ :rtsp_session_id => option_types[:object_point] + 190,
209
+ :rtsp_stream_uri => option_types[:object_point] + 191,
210
+ :rtsp_transport => option_types[:object_point] + 192,
211
+ :rtsp_client_cseq => option_types[:long] + 193,
212
+ :rtsp_server_cseq => option_types[:long] + 194,
213
+ :interleavedata => option_types[:object_point] + 195,
214
+ :interleavefunction => option_types[:function_point] + 196,
215
+ :wildcardmatch => option_types[:long] + 197,
216
+ :chunk_bgn_function => option_types[:function_point] + 198,
217
+ :chunk_end_function => option_types[:function_point] + 199,
218
+ :fnmatch_function => option_types[:function_point] + 200,
219
+ :chunk_data => option_types[:object_point] + 201,
220
+ :fnmatch_data => option_types[:object_point] + 202,
221
+ :resolve => option_types[:object_point] + 203,
222
+ :tlsauth_username => option_types[:object_point] + 204,
223
+ :tlsauth_password => option_types[:object_point] + 205,
224
+ :tlsauth_type => option_types[:object_point] + 206,
225
+ :transfer_encoding => option_types[:long] + 207,
226
+ :closesocketfunction => option_types[:function_point] + 208,
227
+ :closesocketdata => option_types[:object_point] + 209,
228
+ :gssapi_delegation => option_types[:long] + 210,
229
+ :dns_servers => option_types[:object_point] + 211,
230
+ :accepttimeout_ms => option_types[:long] + 212,
231
+ :tcp_keepalive => option_types[:long] + 213,
232
+ :tcp_keepidle => option_types[:long] + 214,
233
+ :tcp_keepintvl => option_types[:long] + 215,
234
+ :ssl_options => option_types[:long] + 216,
235
+ :mail_auth => option_types[:object_point] + 217
170
236
  }
171
237
  end
172
238
  end