mail 2.7.1.rc1 → 2.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,7 @@
1
1
 
2
2
  # frozen_string_literal: true
3
- require 'mail/utilities'
4
- require 'mail/parser_tools'
5
-
6
-
7
-
3
+ require "mail/utilities"
4
+ require "mail/parser_tools"
8
5
 
9
6
  module Mail::Parsers
10
7
  module ContentTransferEncodingParser
@@ -12,334 +9,331 @@ module Mail::Parsers
12
9
 
13
10
  ContentTransferEncodingStruct = Struct.new(:encoding, :error)
14
11
 
15
-
16
- class << self
17
- attr_accessor :_trans_keys
18
- private :_trans_keys, :_trans_keys=
19
- end
20
- self._trans_keys = [
21
- 0, 0, 9, 126, 10, 10,
22
- 9, 32, 10, 10, 9,
23
- 32, 10, 10, 9, 32,
24
- 9, 126, 1, 244, 1, 244,
25
- 10, 10, 9, 32, 0,
26
- 244, 128, 191, 160, 191,
27
- 128, 191, 128, 159, 144, 191,
28
- 128, 191, 128, 143, 9,
29
- 126, 9, 59, 9, 59,
30
- 9, 40, 9, 40, 0, 0,
31
- 0
32
- ]
33
-
34
- class << self
35
- attr_accessor :_key_spans
36
- private :_key_spans, :_key_spans=
37
- end
38
- self._key_spans = [
39
- 0, 118, 1, 24, 1, 24, 1, 24,
40
- 118, 244, 244, 1, 24, 245, 64, 32,
41
- 64, 32, 48, 64, 16, 118, 51, 51,
42
- 32, 32, 0
43
- ]
44
-
45
- class << self
46
- attr_accessor :_index_offsets
47
- private :_index_offsets, :_index_offsets=
48
- end
49
- self._index_offsets = [
50
- 0, 0, 119, 121, 146, 148, 173, 175,
51
- 200, 319, 564, 809, 811, 836, 1082, 1147,
52
- 1180, 1245, 1278, 1327, 1392, 1409, 1528, 1580,
53
- 1632, 1665, 1698
54
- ]
12
+ class << self
13
+ attr_accessor :_trans_keys
14
+ private :_trans_keys, :_trans_keys=
15
+ end
16
+ self._trans_keys = [
17
+ 0, 0, 9, 126, 10, 10,
18
+ 9, 32, 10, 10, 9,
19
+ 32, 10, 10, 9, 32,
20
+ 9, 126, 1, 244, 1, 244,
21
+ 10, 10, 9, 32, 0,
22
+ 244, 128, 191, 160, 191,
23
+ 128, 191, 128, 159, 144, 191,
24
+ 128, 191, 128, 143, 9,
25
+ 126, 9, 59, 9, 59,
26
+ 9, 40, 9, 40, 0, 0,
27
+ 0,
28
+ ]
55
29
 
56
- class << self
57
- attr_accessor :_indicies
58
- private :_indicies, :_indicies=
59
- end
60
- self._indicies = [
61
- 0, 1, 1, 1, 2, 1, 1, 1,
62
- 1, 1, 1, 1, 1, 1, 1, 1,
63
- 1, 1, 1, 1, 1, 1, 1, 0,
64
- 3, 3, 3, 3, 3, 3, 3, 4,
65
- 1, 3, 3, 3, 3, 3, 1, 3,
66
- 3, 3, 3, 3, 3, 3, 3, 3,
67
- 3, 1, 1, 1, 1, 1, 1, 1,
68
- 3, 3, 3, 3, 3, 3, 3, 3,
69
- 3, 3, 3, 3, 3, 3, 3, 3,
70
- 3, 3, 3, 3, 3, 3, 3, 3,
71
- 3, 3, 1, 1, 1, 3, 3, 3,
72
- 3, 3, 3, 3, 3, 3, 3, 3,
73
- 3, 3, 3, 3, 3, 3, 3, 3,
74
- 3, 3, 3, 3, 3, 3, 3, 3,
75
- 3, 3, 3, 3, 3, 3, 1, 5,
76
- 1, 0, 1, 1, 1, 1, 1, 1,
77
- 1, 1, 1, 1, 1, 1, 1, 1,
78
- 1, 1, 1, 1, 1, 1, 1, 1,
79
- 0, 1, 6, 1, 7, 1, 1, 1,
80
- 1, 1, 1, 1, 1, 1, 1, 1,
81
- 1, 1, 1, 1, 1, 1, 1, 1,
82
- 1, 1, 1, 7, 1, 8, 1, 9,
83
- 1, 1, 1, 1, 1, 1, 1, 1,
84
- 1, 1, 1, 1, 1, 1, 1, 1,
85
- 1, 1, 1, 1, 1, 1, 9, 1,
86
- 10, 1, 1, 1, 11, 1, 1, 1,
87
- 1, 1, 1, 1, 1, 1, 1, 1,
88
- 1, 1, 1, 1, 1, 1, 1, 10,
89
- 12, 12, 12, 12, 12, 12, 12, 13,
90
- 1, 12, 12, 12, 12, 12, 1, 12,
91
- 12, 12, 12, 12, 12, 12, 12, 12,
92
- 12, 1, 1, 1, 1, 1, 1, 1,
93
- 12, 12, 12, 12, 12, 12, 12, 12,
94
- 12, 12, 12, 12, 12, 12, 12, 12,
95
- 12, 12, 12, 12, 12, 12, 12, 12,
96
- 12, 12, 1, 1, 1, 12, 12, 12,
97
- 12, 12, 12, 12, 12, 12, 12, 12,
98
- 12, 12, 12, 12, 12, 12, 12, 12,
99
- 12, 12, 12, 12, 12, 12, 12, 12,
100
- 12, 12, 12, 12, 12, 12, 1, 14,
101
- 14, 14, 14, 14, 14, 14, 14, 14,
102
- 1, 14, 14, 15, 14, 14, 14, 14,
103
- 14, 14, 14, 14, 14, 14, 14, 14,
104
- 14, 14, 14, 14, 14, 14, 14, 14,
105
- 14, 14, 14, 14, 14, 14, 16, 17,
106
- 14, 14, 14, 14, 14, 14, 14, 14,
107
- 14, 14, 14, 14, 14, 14, 14, 14,
108
- 14, 14, 14, 14, 14, 14, 14, 14,
109
- 14, 14, 14, 14, 14, 14, 14, 14,
110
- 14, 14, 14, 14, 14, 14, 14, 14,
111
- 14, 14, 14, 14, 14, 14, 14, 14,
112
- 14, 14, 18, 14, 14, 14, 14, 14,
113
- 14, 14, 14, 14, 14, 14, 14, 14,
114
- 14, 14, 14, 14, 14, 14, 14, 14,
115
- 14, 14, 14, 14, 14, 14, 14, 14,
116
- 14, 14, 14, 14, 14, 14, 1, 1,
117
- 1, 1, 1, 1, 1, 1, 1, 1,
118
- 1, 1, 1, 1, 1, 1, 1, 1,
119
- 1, 1, 1, 1, 1, 1, 1, 1,
120
- 1, 1, 1, 1, 1, 1, 1, 1,
121
- 1, 1, 1, 1, 1, 1, 1, 1,
122
- 1, 1, 1, 1, 1, 1, 1, 1,
123
- 1, 1, 1, 1, 1, 1, 1, 1,
124
- 1, 1, 1, 1, 1, 1, 1, 1,
125
- 19, 19, 19, 19, 19, 19, 19, 19,
126
- 19, 19, 19, 19, 19, 19, 19, 19,
127
- 19, 19, 19, 19, 19, 19, 19, 19,
128
- 19, 19, 19, 19, 19, 19, 20, 21,
129
- 21, 21, 21, 21, 21, 21, 21, 21,
130
- 21, 21, 21, 22, 21, 21, 23, 24,
131
- 24, 24, 25, 1, 26, 26, 26, 26,
132
- 26, 26, 26, 26, 26, 1, 26, 26,
133
- 27, 26, 26, 26, 26, 26, 26, 26,
134
- 26, 26, 26, 26, 26, 26, 26, 26,
135
- 26, 26, 26, 26, 26, 26, 26, 26,
136
- 26, 26, 26, 28, 29, 26, 26, 26,
137
- 26, 26, 26, 26, 26, 26, 26, 26,
138
- 26, 26, 26, 26, 26, 26, 26, 26,
139
- 26, 26, 26, 26, 26, 26, 26, 26,
140
- 26, 26, 26, 26, 26, 26, 26, 26,
141
- 26, 26, 26, 26, 26, 26, 26, 26,
142
- 26, 26, 26, 26, 26, 26, 26, 30,
143
- 26, 26, 26, 26, 26, 26, 26, 26,
144
- 26, 26, 26, 26, 26, 26, 26, 26,
145
- 26, 26, 26, 26, 26, 26, 26, 26,
146
- 26, 26, 26, 26, 26, 26, 26, 26,
147
- 26, 26, 26, 1, 1, 1, 1, 1,
148
- 1, 1, 1, 1, 1, 1, 1, 1,
149
- 1, 1, 1, 1, 1, 1, 1, 1,
150
- 1, 1, 1, 1, 1, 1, 1, 1,
151
- 1, 1, 1, 1, 1, 1, 1, 1,
152
- 1, 1, 1, 1, 1, 1, 1, 1,
153
- 1, 1, 1, 1, 1, 1, 1, 1,
154
- 1, 1, 1, 1, 1, 1, 1, 1,
155
- 1, 1, 1, 1, 1, 31, 31, 31,
156
- 31, 31, 31, 31, 31, 31, 31, 31,
157
- 31, 31, 31, 31, 31, 31, 31, 31,
158
- 31, 31, 31, 31, 31, 31, 31, 31,
159
- 31, 31, 31, 32, 33, 33, 33, 33,
160
- 33, 33, 33, 33, 33, 33, 33, 33,
161
- 34, 33, 33, 35, 36, 36, 36, 37,
162
- 1, 38, 1, 26, 1, 1, 1, 1,
163
- 1, 1, 1, 1, 1, 1, 1, 1,
164
- 1, 1, 1, 1, 1, 1, 1, 1,
165
- 1, 1, 26, 1, 26, 26, 26, 26,
166
- 26, 26, 26, 26, 26, 26, 26, 26,
167
- 26, 26, 26, 26, 26, 26, 26, 26,
168
- 26, 26, 26, 26, 26, 26, 26, 26,
169
- 26, 26, 26, 26, 26, 26, 26, 26,
170
- 26, 26, 26, 26, 26, 26, 26, 26,
171
- 26, 26, 26, 26, 26, 26, 26, 26,
172
- 26, 26, 26, 26, 26, 26, 26, 26,
173
- 26, 26, 26, 26, 26, 26, 26, 26,
174
- 26, 26, 26, 26, 26, 26, 26, 26,
175
- 26, 26, 26, 26, 26, 26, 26, 26,
176
- 26, 26, 26, 26, 26, 26, 26, 26,
177
- 26, 26, 26, 26, 26, 26, 26, 26,
178
- 26, 26, 26, 26, 26, 26, 26, 26,
179
- 26, 26, 26, 26, 26, 26, 26, 26,
180
- 26, 26, 26, 26, 26, 26, 26, 26,
181
- 26, 26, 26, 26, 1, 1, 1, 1,
182
- 1, 1, 1, 1, 1, 1, 1, 1,
183
- 1, 1, 1, 1, 1, 1, 1, 1,
184
- 1, 1, 1, 1, 1, 1, 1, 1,
185
- 1, 1, 1, 1, 1, 1, 1, 1,
186
- 1, 1, 1, 1, 1, 1, 1, 1,
187
- 1, 1, 1, 1, 1, 1, 1, 1,
188
- 1, 1, 1, 1, 1, 1, 1, 1,
189
- 1, 1, 1, 1, 1, 1, 31, 31,
190
- 31, 31, 31, 31, 31, 31, 31, 31,
191
- 31, 31, 31, 31, 31, 31, 31, 31,
192
- 31, 31, 31, 31, 31, 31, 31, 31,
193
- 31, 31, 31, 31, 32, 33, 33, 33,
194
- 33, 33, 33, 33, 33, 33, 33, 33,
195
- 33, 34, 33, 33, 35, 36, 36, 36,
196
- 37, 1, 26, 26, 26, 26, 26, 26,
197
- 26, 26, 26, 26, 26, 26, 26, 26,
198
- 26, 26, 26, 26, 26, 26, 26, 26,
199
- 26, 26, 26, 26, 26, 26, 26, 26,
200
- 26, 26, 26, 26, 26, 26, 26, 26,
201
- 26, 26, 26, 26, 26, 26, 26, 26,
202
- 26, 26, 26, 26, 26, 26, 26, 26,
203
- 26, 26, 26, 26, 26, 26, 26, 26,
204
- 26, 26, 1, 31, 31, 31, 31, 31,
205
- 31, 31, 31, 31, 31, 31, 31, 31,
206
- 31, 31, 31, 31, 31, 31, 31, 31,
207
- 31, 31, 31, 31, 31, 31, 31, 31,
208
- 31, 31, 31, 1, 31, 31, 31, 31,
209
- 31, 31, 31, 31, 31, 31, 31, 31,
210
- 31, 31, 31, 31, 31, 31, 31, 31,
211
- 31, 31, 31, 31, 31, 31, 31, 31,
212
- 31, 31, 31, 31, 31, 31, 31, 31,
213
- 31, 31, 31, 31, 31, 31, 31, 31,
214
- 31, 31, 31, 31, 31, 31, 31, 31,
215
- 31, 31, 31, 31, 31, 31, 31, 31,
216
- 31, 31, 31, 31, 1, 31, 31, 31,
217
- 31, 31, 31, 31, 31, 31, 31, 31,
218
- 31, 31, 31, 31, 31, 31, 31, 31,
219
- 31, 31, 31, 31, 31, 31, 31, 31,
220
- 31, 31, 31, 31, 31, 1, 33, 33,
221
- 33, 33, 33, 33, 33, 33, 33, 33,
222
- 33, 33, 33, 33, 33, 33, 33, 33,
223
- 33, 33, 33, 33, 33, 33, 33, 33,
224
- 33, 33, 33, 33, 33, 33, 33, 33,
225
- 33, 33, 33, 33, 33, 33, 33, 33,
226
- 33, 33, 33, 33, 33, 33, 1, 33,
227
- 33, 33, 33, 33, 33, 33, 33, 33,
228
- 33, 33, 33, 33, 33, 33, 33, 33,
229
- 33, 33, 33, 33, 33, 33, 33, 33,
230
- 33, 33, 33, 33, 33, 33, 33, 33,
231
- 33, 33, 33, 33, 33, 33, 33, 33,
232
- 33, 33, 33, 33, 33, 33, 33, 33,
233
- 33, 33, 33, 33, 33, 33, 33, 33,
234
- 33, 33, 33, 33, 33, 33, 33, 1,
235
- 33, 33, 33, 33, 33, 33, 33, 33,
236
- 33, 33, 33, 33, 33, 33, 33, 33,
237
- 1, 39, 1, 1, 1, 40, 1, 1,
238
- 1, 1, 1, 1, 1, 1, 1, 1,
239
- 1, 1, 1, 1, 1, 1, 1, 1,
240
- 39, 41, 41, 41, 41, 41, 41, 41,
241
- 42, 1, 41, 41, 41, 41, 41, 1,
242
- 41, 41, 41, 41, 41, 41, 41, 41,
243
- 41, 41, 1, 43, 1, 1, 1, 1,
244
- 1, 41, 41, 41, 41, 41, 41, 41,
245
- 41, 41, 41, 41, 41, 41, 41, 41,
246
- 41, 41, 41, 41, 41, 41, 41, 41,
247
- 41, 41, 41, 1, 1, 1, 41, 41,
248
- 41, 41, 41, 41, 41, 41, 41, 41,
249
- 41, 41, 41, 41, 41, 41, 41, 41,
250
- 41, 41, 41, 41, 41, 41, 41, 41,
251
- 41, 41, 41, 41, 41, 41, 41, 1,
252
- 7, 1, 1, 1, 44, 1, 1, 1,
253
- 1, 1, 1, 1, 1, 1, 1, 1,
254
- 1, 1, 1, 1, 1, 1, 1, 7,
255
- 1, 1, 1, 1, 1, 1, 1, 45,
256
- 1, 1, 1, 1, 1, 1, 1, 1,
257
- 1, 1, 1, 1, 1, 1, 1, 1,
258
- 1, 1, 9, 1, 46, 1, 1, 1,
259
- 47, 1, 1, 1, 1, 1, 1, 1,
260
- 1, 1, 1, 1, 1, 1, 1, 1,
261
- 1, 1, 1, 46, 1, 1, 1, 1,
262
- 1, 1, 1, 48, 1, 1, 1, 1,
263
- 1, 1, 1, 1, 1, 1, 1, 1,
264
- 1, 1, 1, 1, 1, 1, 49, 1,
265
- 9, 1, 1, 1, 50, 1, 1, 1,
266
- 1, 1, 1, 1, 1, 1, 1, 1,
267
- 1, 1, 1, 1, 1, 1, 1, 9,
268
- 1, 1, 1, 1, 1, 1, 1, 51,
269
- 1, 49, 1, 1, 1, 52, 1, 1,
270
- 1, 1, 1, 1, 1, 1, 1, 1,
271
- 1, 1, 1, 1, 1, 1, 1, 1,
272
- 49, 1, 1, 1, 1, 1, 1, 1,
273
- 53, 1, 1, 0
274
- ]
30
+ class << self
31
+ attr_accessor :_key_spans
32
+ private :_key_spans, :_key_spans=
33
+ end
34
+ self._key_spans = [
35
+ 0, 118, 1, 24, 1, 24, 1, 24,
36
+ 118, 244, 244, 1, 24, 245, 64, 32,
37
+ 64, 32, 48, 64, 16, 118, 51, 51,
38
+ 32, 32, 0,
39
+ ]
275
40
 
276
- class << self
277
- attr_accessor :_trans_targs
278
- private :_trans_targs, :_trans_targs=
279
- end
280
- self._trans_targs = [
281
- 1, 0, 2, 21, 8, 3, 5, 22,
282
- 7, 24, 1, 2, 21, 8, 10, 11,
283
- 10, 26, 13, 14, 15, 16, 17, 18,
284
- 19, 20, 10, 11, 10, 26, 13, 14,
285
- 15, 16, 17, 18, 19, 20, 12, 22,
286
- 4, 21, 23, 24, 4, 23, 22, 4,
287
- 23, 24, 6, 25, 6, 25
288
- ]
41
+ class << self
42
+ attr_accessor :_index_offsets
43
+ private :_index_offsets, :_index_offsets=
44
+ end
45
+ self._index_offsets = [
46
+ 0, 0, 119, 121, 146, 148, 173, 175,
47
+ 200, 319, 564, 809, 811, 836, 1082, 1147,
48
+ 1180, 1245, 1278, 1327, 1392, 1409, 1528, 1580,
49
+ 1632, 1665, 1698,
50
+ ]
289
51
 
290
- class << self
291
- attr_accessor :_trans_actions
292
- private :_trans_actions, :_trans_actions=
293
- end
294
- self._trans_actions = [
295
- 0, 0, 0, 1, 2, 0, 0, 0,
296
- 0, 0, 3, 3, 4, 5, 6, 6,
297
- 7, 8, 6, 6, 6, 6, 6, 6,
298
- 6, 6, 0, 0, 2, 9, 0, 0,
299
- 0, 0, 0, 0, 0, 0, 0, 10,
300
- 10, 0, 11, 10, 0, 2, 3, 3,
301
- 5, 3, 0, 2, 3, 5
302
- ]
52
+ class << self
53
+ attr_accessor :_indicies
54
+ private :_indicies, :_indicies=
55
+ end
56
+ self._indicies = [
57
+ 0, 1, 1, 1, 2, 1, 1, 1,
58
+ 1, 1, 1, 1, 1, 1, 1, 1,
59
+ 1, 1, 1, 1, 1, 1, 1, 0,
60
+ 3, 3, 3, 3, 3, 3, 3, 4,
61
+ 1, 3, 3, 3, 3, 3, 1, 3,
62
+ 3, 3, 3, 3, 3, 3, 3, 3,
63
+ 3, 1, 1, 1, 1, 1, 1, 1,
64
+ 3, 3, 3, 3, 3, 3, 3, 3,
65
+ 3, 3, 3, 3, 3, 3, 3, 3,
66
+ 3, 3, 3, 3, 3, 3, 3, 3,
67
+ 3, 3, 1, 1, 1, 3, 3, 3,
68
+ 3, 3, 3, 3, 3, 3, 3, 3,
69
+ 3, 3, 3, 3, 3, 3, 3, 3,
70
+ 3, 3, 3, 3, 3, 3, 3, 3,
71
+ 3, 3, 3, 3, 3, 3, 1, 5,
72
+ 1, 0, 1, 1, 1, 1, 1, 1,
73
+ 1, 1, 1, 1, 1, 1, 1, 1,
74
+ 1, 1, 1, 1, 1, 1, 1, 1,
75
+ 0, 1, 6, 1, 7, 1, 1, 1,
76
+ 1, 1, 1, 1, 1, 1, 1, 1,
77
+ 1, 1, 1, 1, 1, 1, 1, 1,
78
+ 1, 1, 1, 7, 1, 8, 1, 9,
79
+ 1, 1, 1, 1, 1, 1, 1, 1,
80
+ 1, 1, 1, 1, 1, 1, 1, 1,
81
+ 1, 1, 1, 1, 1, 1, 9, 1,
82
+ 10, 1, 1, 1, 11, 1, 1, 1,
83
+ 1, 1, 1, 1, 1, 1, 1, 1,
84
+ 1, 1, 1, 1, 1, 1, 1, 10,
85
+ 12, 12, 12, 12, 12, 12, 12, 13,
86
+ 1, 12, 12, 12, 12, 12, 1, 12,
87
+ 12, 12, 12, 12, 12, 12, 12, 12,
88
+ 12, 1, 1, 1, 1, 1, 1, 1,
89
+ 12, 12, 12, 12, 12, 12, 12, 12,
90
+ 12, 12, 12, 12, 12, 12, 12, 12,
91
+ 12, 12, 12, 12, 12, 12, 12, 12,
92
+ 12, 12, 1, 1, 1, 12, 12, 12,
93
+ 12, 12, 12, 12, 12, 12, 12, 12,
94
+ 12, 12, 12, 12, 12, 12, 12, 12,
95
+ 12, 12, 12, 12, 12, 12, 12, 12,
96
+ 12, 12, 12, 12, 12, 12, 1, 14,
97
+ 14, 14, 14, 14, 14, 14, 14, 14,
98
+ 1, 14, 14, 15, 14, 14, 14, 14,
99
+ 14, 14, 14, 14, 14, 14, 14, 14,
100
+ 14, 14, 14, 14, 14, 14, 14, 14,
101
+ 14, 14, 14, 14, 14, 14, 16, 17,
102
+ 14, 14, 14, 14, 14, 14, 14, 14,
103
+ 14, 14, 14, 14, 14, 14, 14, 14,
104
+ 14, 14, 14, 14, 14, 14, 14, 14,
105
+ 14, 14, 14, 14, 14, 14, 14, 14,
106
+ 14, 14, 14, 14, 14, 14, 14, 14,
107
+ 14, 14, 14, 14, 14, 14, 14, 14,
108
+ 14, 14, 18, 14, 14, 14, 14, 14,
109
+ 14, 14, 14, 14, 14, 14, 14, 14,
110
+ 14, 14, 14, 14, 14, 14, 14, 14,
111
+ 14, 14, 14, 14, 14, 14, 14, 14,
112
+ 14, 14, 14, 14, 14, 14, 1, 1,
113
+ 1, 1, 1, 1, 1, 1, 1, 1,
114
+ 1, 1, 1, 1, 1, 1, 1, 1,
115
+ 1, 1, 1, 1, 1, 1, 1, 1,
116
+ 1, 1, 1, 1, 1, 1, 1, 1,
117
+ 1, 1, 1, 1, 1, 1, 1, 1,
118
+ 1, 1, 1, 1, 1, 1, 1, 1,
119
+ 1, 1, 1, 1, 1, 1, 1, 1,
120
+ 1, 1, 1, 1, 1, 1, 1, 1,
121
+ 19, 19, 19, 19, 19, 19, 19, 19,
122
+ 19, 19, 19, 19, 19, 19, 19, 19,
123
+ 19, 19, 19, 19, 19, 19, 19, 19,
124
+ 19, 19, 19, 19, 19, 19, 20, 21,
125
+ 21, 21, 21, 21, 21, 21, 21, 21,
126
+ 21, 21, 21, 22, 21, 21, 23, 24,
127
+ 24, 24, 25, 1, 26, 26, 26, 26,
128
+ 26, 26, 26, 26, 26, 1, 26, 26,
129
+ 27, 26, 26, 26, 26, 26, 26, 26,
130
+ 26, 26, 26, 26, 26, 26, 26, 26,
131
+ 26, 26, 26, 26, 26, 26, 26, 26,
132
+ 26, 26, 26, 28, 29, 26, 26, 26,
133
+ 26, 26, 26, 26, 26, 26, 26, 26,
134
+ 26, 26, 26, 26, 26, 26, 26, 26,
135
+ 26, 26, 26, 26, 26, 26, 26, 26,
136
+ 26, 26, 26, 26, 26, 26, 26, 26,
137
+ 26, 26, 26, 26, 26, 26, 26, 26,
138
+ 26, 26, 26, 26, 26, 26, 26, 30,
139
+ 26, 26, 26, 26, 26, 26, 26, 26,
140
+ 26, 26, 26, 26, 26, 26, 26, 26,
141
+ 26, 26, 26, 26, 26, 26, 26, 26,
142
+ 26, 26, 26, 26, 26, 26, 26, 26,
143
+ 26, 26, 26, 1, 1, 1, 1, 1,
144
+ 1, 1, 1, 1, 1, 1, 1, 1,
145
+ 1, 1, 1, 1, 1, 1, 1, 1,
146
+ 1, 1, 1, 1, 1, 1, 1, 1,
147
+ 1, 1, 1, 1, 1, 1, 1, 1,
148
+ 1, 1, 1, 1, 1, 1, 1, 1,
149
+ 1, 1, 1, 1, 1, 1, 1, 1,
150
+ 1, 1, 1, 1, 1, 1, 1, 1,
151
+ 1, 1, 1, 1, 1, 31, 31, 31,
152
+ 31, 31, 31, 31, 31, 31, 31, 31,
153
+ 31, 31, 31, 31, 31, 31, 31, 31,
154
+ 31, 31, 31, 31, 31, 31, 31, 31,
155
+ 31, 31, 31, 32, 33, 33, 33, 33,
156
+ 33, 33, 33, 33, 33, 33, 33, 33,
157
+ 34, 33, 33, 35, 36, 36, 36, 37,
158
+ 1, 38, 1, 26, 1, 1, 1, 1,
159
+ 1, 1, 1, 1, 1, 1, 1, 1,
160
+ 1, 1, 1, 1, 1, 1, 1, 1,
161
+ 1, 1, 26, 1, 26, 26, 26, 26,
162
+ 26, 26, 26, 26, 26, 26, 26, 26,
163
+ 26, 26, 26, 26, 26, 26, 26, 26,
164
+ 26, 26, 26, 26, 26, 26, 26, 26,
165
+ 26, 26, 26, 26, 26, 26, 26, 26,
166
+ 26, 26, 26, 26, 26, 26, 26, 26,
167
+ 26, 26, 26, 26, 26, 26, 26, 26,
168
+ 26, 26, 26, 26, 26, 26, 26, 26,
169
+ 26, 26, 26, 26, 26, 26, 26, 26,
170
+ 26, 26, 26, 26, 26, 26, 26, 26,
171
+ 26, 26, 26, 26, 26, 26, 26, 26,
172
+ 26, 26, 26, 26, 26, 26, 26, 26,
173
+ 26, 26, 26, 26, 26, 26, 26, 26,
174
+ 26, 26, 26, 26, 26, 26, 26, 26,
175
+ 26, 26, 26, 26, 26, 26, 26, 26,
176
+ 26, 26, 26, 26, 26, 26, 26, 26,
177
+ 26, 26, 26, 26, 1, 1, 1, 1,
178
+ 1, 1, 1, 1, 1, 1, 1, 1,
179
+ 1, 1, 1, 1, 1, 1, 1, 1,
180
+ 1, 1, 1, 1, 1, 1, 1, 1,
181
+ 1, 1, 1, 1, 1, 1, 1, 1,
182
+ 1, 1, 1, 1, 1, 1, 1, 1,
183
+ 1, 1, 1, 1, 1, 1, 1, 1,
184
+ 1, 1, 1, 1, 1, 1, 1, 1,
185
+ 1, 1, 1, 1, 1, 1, 31, 31,
186
+ 31, 31, 31, 31, 31, 31, 31, 31,
187
+ 31, 31, 31, 31, 31, 31, 31, 31,
188
+ 31, 31, 31, 31, 31, 31, 31, 31,
189
+ 31, 31, 31, 31, 32, 33, 33, 33,
190
+ 33, 33, 33, 33, 33, 33, 33, 33,
191
+ 33, 34, 33, 33, 35, 36, 36, 36,
192
+ 37, 1, 26, 26, 26, 26, 26, 26,
193
+ 26, 26, 26, 26, 26, 26, 26, 26,
194
+ 26, 26, 26, 26, 26, 26, 26, 26,
195
+ 26, 26, 26, 26, 26, 26, 26, 26,
196
+ 26, 26, 26, 26, 26, 26, 26, 26,
197
+ 26, 26, 26, 26, 26, 26, 26, 26,
198
+ 26, 26, 26, 26, 26, 26, 26, 26,
199
+ 26, 26, 26, 26, 26, 26, 26, 26,
200
+ 26, 26, 1, 31, 31, 31, 31, 31,
201
+ 31, 31, 31, 31, 31, 31, 31, 31,
202
+ 31, 31, 31, 31, 31, 31, 31, 31,
203
+ 31, 31, 31, 31, 31, 31, 31, 31,
204
+ 31, 31, 31, 1, 31, 31, 31, 31,
205
+ 31, 31, 31, 31, 31, 31, 31, 31,
206
+ 31, 31, 31, 31, 31, 31, 31, 31,
207
+ 31, 31, 31, 31, 31, 31, 31, 31,
208
+ 31, 31, 31, 31, 31, 31, 31, 31,
209
+ 31, 31, 31, 31, 31, 31, 31, 31,
210
+ 31, 31, 31, 31, 31, 31, 31, 31,
211
+ 31, 31, 31, 31, 31, 31, 31, 31,
212
+ 31, 31, 31, 31, 1, 31, 31, 31,
213
+ 31, 31, 31, 31, 31, 31, 31, 31,
214
+ 31, 31, 31, 31, 31, 31, 31, 31,
215
+ 31, 31, 31, 31, 31, 31, 31, 31,
216
+ 31, 31, 31, 31, 31, 1, 33, 33,
217
+ 33, 33, 33, 33, 33, 33, 33, 33,
218
+ 33, 33, 33, 33, 33, 33, 33, 33,
219
+ 33, 33, 33, 33, 33, 33, 33, 33,
220
+ 33, 33, 33, 33, 33, 33, 33, 33,
221
+ 33, 33, 33, 33, 33, 33, 33, 33,
222
+ 33, 33, 33, 33, 33, 33, 1, 33,
223
+ 33, 33, 33, 33, 33, 33, 33, 33,
224
+ 33, 33, 33, 33, 33, 33, 33, 33,
225
+ 33, 33, 33, 33, 33, 33, 33, 33,
226
+ 33, 33, 33, 33, 33, 33, 33, 33,
227
+ 33, 33, 33, 33, 33, 33, 33, 33,
228
+ 33, 33, 33, 33, 33, 33, 33, 33,
229
+ 33, 33, 33, 33, 33, 33, 33, 33,
230
+ 33, 33, 33, 33, 33, 33, 33, 1,
231
+ 33, 33, 33, 33, 33, 33, 33, 33,
232
+ 33, 33, 33, 33, 33, 33, 33, 33,
233
+ 1, 39, 1, 1, 1, 40, 1, 1,
234
+ 1, 1, 1, 1, 1, 1, 1, 1,
235
+ 1, 1, 1, 1, 1, 1, 1, 1,
236
+ 39, 41, 41, 41, 41, 41, 41, 41,
237
+ 42, 1, 41, 41, 41, 41, 41, 1,
238
+ 41, 41, 41, 41, 41, 41, 41, 41,
239
+ 41, 41, 1, 43, 1, 1, 1, 1,
240
+ 1, 41, 41, 41, 41, 41, 41, 41,
241
+ 41, 41, 41, 41, 41, 41, 41, 41,
242
+ 41, 41, 41, 41, 41, 41, 41, 41,
243
+ 41, 41, 41, 1, 1, 1, 41, 41,
244
+ 41, 41, 41, 41, 41, 41, 41, 41,
245
+ 41, 41, 41, 41, 41, 41, 41, 41,
246
+ 41, 41, 41, 41, 41, 41, 41, 41,
247
+ 41, 41, 41, 41, 41, 41, 41, 1,
248
+ 7, 1, 1, 1, 44, 1, 1, 1,
249
+ 1, 1, 1, 1, 1, 1, 1, 1,
250
+ 1, 1, 1, 1, 1, 1, 1, 7,
251
+ 1, 1, 1, 1, 1, 1, 1, 45,
252
+ 1, 1, 1, 1, 1, 1, 1, 1,
253
+ 1, 1, 1, 1, 1, 1, 1, 1,
254
+ 1, 1, 9, 1, 46, 1, 1, 1,
255
+ 47, 1, 1, 1, 1, 1, 1, 1,
256
+ 1, 1, 1, 1, 1, 1, 1, 1,
257
+ 1, 1, 1, 46, 1, 1, 1, 1,
258
+ 1, 1, 1, 48, 1, 1, 1, 1,
259
+ 1, 1, 1, 1, 1, 1, 1, 1,
260
+ 1, 1, 1, 1, 1, 1, 49, 1,
261
+ 9, 1, 1, 1, 50, 1, 1, 1,
262
+ 1, 1, 1, 1, 1, 1, 1, 1,
263
+ 1, 1, 1, 1, 1, 1, 1, 9,
264
+ 1, 1, 1, 1, 1, 1, 1, 51,
265
+ 1, 49, 1, 1, 1, 52, 1, 1,
266
+ 1, 1, 1, 1, 1, 1, 1, 1,
267
+ 1, 1, 1, 1, 1, 1, 1, 1,
268
+ 49, 1, 1, 1, 1, 1, 1, 1,
269
+ 53, 1, 1, 0,
270
+ ]
303
271
 
304
- class << self
305
- attr_accessor :_eof_actions
306
- private :_eof_actions, :_eof_actions=
307
- end
308
- self._eof_actions = [
309
- 0, 0, 0, 0, 0, 0, 0, 0,
310
- 0, 0, 0, 0, 0, 0, 0, 0,
311
- 0, 0, 0, 0, 0, 10, 0, 3,
312
- 0, 3, 0
313
- ]
272
+ class << self
273
+ attr_accessor :_trans_targs
274
+ private :_trans_targs, :_trans_targs=
275
+ end
276
+ self._trans_targs = [
277
+ 1, 0, 2, 21, 8, 3, 5, 22,
278
+ 7, 24, 1, 2, 21, 8, 10, 11,
279
+ 10, 26, 13, 14, 15, 16, 17, 18,
280
+ 19, 20, 10, 11, 10, 26, 13, 14,
281
+ 15, 16, 17, 18, 19, 20, 12, 22,
282
+ 4, 21, 23, 24, 4, 23, 22, 4,
283
+ 23, 24, 6, 25, 6, 25,
284
+ ]
314
285
 
315
- class << self
316
- attr_accessor :start
317
- end
318
- self.start = 1;
319
- class << self
320
- attr_accessor :first_final
321
- end
322
- self.first_final = 21;
323
- class << self
324
- attr_accessor :error
325
- end
326
- self.error = 0;
286
+ class << self
287
+ attr_accessor :_trans_actions
288
+ private :_trans_actions, :_trans_actions=
289
+ end
290
+ self._trans_actions = [
291
+ 0, 0, 0, 1, 2, 0, 0, 0,
292
+ 0, 0, 3, 3, 4, 5, 6, 6,
293
+ 7, 8, 6, 6, 6, 6, 6, 6,
294
+ 6, 6, 0, 0, 2, 9, 0, 0,
295
+ 0, 0, 0, 0, 0, 0, 0, 10,
296
+ 10, 0, 11, 10, 0, 2, 3, 3,
297
+ 5, 3, 0, 2, 3, 5,
298
+ ]
327
299
 
328
- class << self
329
- attr_accessor :en_comment_tail
330
- end
331
- self.en_comment_tail = 9;
332
- class << self
333
- attr_accessor :en_main
334
- end
335
- self.en_main = 1;
300
+ class << self
301
+ attr_accessor :_eof_actions
302
+ private :_eof_actions, :_eof_actions=
303
+ end
304
+ self._eof_actions = [
305
+ 0, 0, 0, 0, 0, 0, 0, 0,
306
+ 0, 0, 0, 0, 0, 0, 0, 0,
307
+ 0, 0, 0, 0, 0, 10, 0, 3,
308
+ 0, 3, 0,
309
+ ]
336
310
 
311
+ class << self
312
+ attr_accessor :start
313
+ end
314
+ self.start = 1
315
+ class << self
316
+ attr_accessor :first_final
317
+ end
318
+ self.first_final = 21
319
+ class << self
320
+ attr_accessor :error
321
+ end
322
+ self.error = 0
337
323
 
324
+ class << self
325
+ attr_accessor :en_comment_tail
326
+ end
327
+ self.en_comment_tail = 9
328
+ class << self
329
+ attr_accessor :en_main
330
+ end
331
+ self.en_main = 1
338
332
 
339
333
  def self.parse(data)
340
334
  data = data.dup.force_encoding(Encoding::ASCII_8BIT) if data.respond_to?(:force_encoding)
341
335
 
342
- content_transfer_encoding = ContentTransferEncodingStruct.new('')
336
+ content_transfer_encoding = ContentTransferEncodingStruct.new("")
343
337
  return content_transfer_encoding if Mail::Utilities.blank?(data)
344
338
 
345
339
  # Parser state
@@ -350,167 +344,167 @@ self.en_main = 1;
350
344
  eof = pe = data.length
351
345
  stack = []
352
346
 
353
-
354
- begin
355
- p ||= 0
356
- pe ||= data.length
357
- cs = start
358
- top = 0
359
- end
360
-
361
-
362
- begin
363
- testEof = false
364
- _slen, _trans, _keys, _inds, _acts, _nacts = nil
365
- _goto_level = 0
366
- _resume = 10
367
- _eof_trans = 15
368
- _again = 20
369
- _test_eof = 30
370
- _out = 40
371
- while true
372
- if _goto_level <= 0
373
- if p == pe
374
- _goto_level = _test_eof
375
- next
376
- end
377
- if cs == 0
378
- _goto_level = _out
379
- next
380
- end
381
- end
382
- if _goto_level <= _resume
383
- _keys = cs << 1
384
- _inds = _index_offsets[cs]
385
- _slen = _key_spans[cs]
386
- _wide = data[p].ord
387
- _trans = if ( _slen > 0 &&
388
- _trans_keys[_keys] <= _wide &&
389
- _wide <= _trans_keys[_keys + 1]
390
- ) then
391
- _indicies[ _inds + _wide - _trans_keys[_keys] ]
392
- else
393
- _indicies[ _inds + _slen ]
394
- end
395
- cs = _trans_targs[_trans]
396
- if _trans_actions[_trans] != 0
397
- case _trans_actions[_trans]
398
- when 1 then
399
- begin
400
- encoding_s = p end
401
- when 10 then
402
- begin
403
- content_transfer_encoding.encoding = chars(data, encoding_s, p-1).downcase end
404
- when 3 then
405
- begin
406
- end
407
- when 6 then
408
- begin
409
- end
410
- when 2 then
411
- begin
412
- begin
413
- stack[top] = cs
414
- top+= 1
415
- cs = 9
416
- _goto_level = _again
417
- next
418
- end
419
- end
420
- when 9 then
421
- begin
422
- begin
423
- top -= 1
424
- cs = stack[top]
425
- _goto_level = _again
426
- next
427
- end
428
- end
429
- when 11 then
430
- begin
431
- content_transfer_encoding.encoding = chars(data, encoding_s, p-1).downcase end
432
- begin
433
- begin
434
- stack[top] = cs
435
- top+= 1
436
- cs = 9
437
- _goto_level = _again
438
- next
439
- end
440
- end
441
- when 4 then
442
- begin
443
- end
444
- begin
445
- encoding_s = p end
446
- when 5 then
447
- begin
448
- end
449
- begin
450
- begin
451
- stack[top] = cs
452
- top+= 1
453
- cs = 9
454
- _goto_level = _again
455
- next
456
- end
457
- end
458
- when 7 then
459
- begin
460
- end
461
- begin
462
- begin
463
- stack[top] = cs
464
- top+= 1
465
- cs = 9
466
- _goto_level = _again
467
- next
468
- end
469
- end
470
- when 8 then
471
- begin
472
- end
473
- begin
474
- begin
475
- top -= 1
476
- cs = stack[top]
477
- _goto_level = _again
478
- next
479
- end
480
- end
481
- end
482
- end
483
- end
484
- if _goto_level <= _again
485
- if cs == 0
486
- _goto_level = _out
487
- next
488
- end
489
- p += 1
490
- if p != pe
491
- _goto_level = _resume
492
- next
493
- end
494
- end
495
- if _goto_level <= _test_eof
496
- if p == eof
497
- case _eof_actions[cs]
498
- when 10 then
499
- begin
500
- content_transfer_encoding.encoding = chars(data, encoding_s, p-1).downcase end
501
- when 3 then
502
- begin
503
- end
504
- end
505
- end
506
-
507
- end
508
- if _goto_level <= _out
509
- break
510
- end
511
- end
512
- end
347
+ begin
348
+ p ||= 0
349
+ pe ||= data.length
350
+ cs = start
351
+ top = 0
352
+ end
513
353
 
354
+ begin
355
+ testEof = false
356
+ _slen, _trans, _keys, _inds, _acts, _nacts = nil
357
+ _goto_level = 0
358
+ _resume = 10
359
+ _eof_trans = 15
360
+ _again = 20
361
+ _test_eof = 30
362
+ _out = 40
363
+ while true
364
+ if _goto_level <= 0
365
+ if p == pe
366
+ _goto_level = _test_eof
367
+ next
368
+ end
369
+ if cs == 0
370
+ _goto_level = _out
371
+ next
372
+ end
373
+ end
374
+ if _goto_level <= _resume
375
+ _keys = cs << 1
376
+ _inds = _index_offsets[cs]
377
+ _slen = _key_spans[cs]
378
+ _wide = data[p].ord
379
+ _trans = if (_slen > 0 &&
380
+ _trans_keys[_keys] <= _wide &&
381
+ _wide <= _trans_keys[_keys + 1])
382
+ _indicies[_inds + _wide - _trans_keys[_keys]]
383
+ else
384
+ _indicies[_inds + _slen]
385
+ end
386
+ cs = _trans_targs[_trans]
387
+ if _trans_actions[_trans] != 0
388
+ case _trans_actions[_trans]
389
+ when 1
390
+ begin
391
+ encoding_s = p
392
+ end
393
+ when 10
394
+ begin
395
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
396
+ end
397
+ when 3
398
+ begin
399
+ end
400
+ when 6
401
+ begin
402
+ end
403
+ when 2
404
+ begin
405
+ begin
406
+ stack[top] = cs
407
+ top += 1
408
+ cs = 9
409
+ _goto_level = _again
410
+ next
411
+ end
412
+ end
413
+ when 9
414
+ begin
415
+ begin
416
+ top -= 1
417
+ cs = stack[top]
418
+ _goto_level = _again
419
+ next
420
+ end
421
+ end
422
+ when 11
423
+ begin
424
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
425
+ end
426
+ begin
427
+ begin
428
+ stack[top] = cs
429
+ top += 1
430
+ cs = 9
431
+ _goto_level = _again
432
+ next
433
+ end
434
+ end
435
+ when 4
436
+ begin
437
+ end
438
+ begin
439
+ encoding_s = p
440
+ end
441
+ when 5
442
+ begin
443
+ end
444
+ begin
445
+ begin
446
+ stack[top] = cs
447
+ top += 1
448
+ cs = 9
449
+ _goto_level = _again
450
+ next
451
+ end
452
+ end
453
+ when 7
454
+ begin
455
+ end
456
+ begin
457
+ begin
458
+ stack[top] = cs
459
+ top += 1
460
+ cs = 9
461
+ _goto_level = _again
462
+ next
463
+ end
464
+ end
465
+ when 8
466
+ begin
467
+ end
468
+ begin
469
+ begin
470
+ top -= 1
471
+ cs = stack[top]
472
+ _goto_level = _again
473
+ next
474
+ end
475
+ end
476
+ end
477
+ end
478
+ end
479
+ if _goto_level <= _again
480
+ if cs == 0
481
+ _goto_level = _out
482
+ next
483
+ end
484
+ p += 1
485
+ if p != pe
486
+ _goto_level = _resume
487
+ next
488
+ end
489
+ end
490
+ if _goto_level <= _test_eof
491
+ if p == eof
492
+ case _eof_actions[cs]
493
+ when 10
494
+ begin
495
+ content_transfer_encoding.encoding = chars(data, encoding_s, p - 1).downcase
496
+ end
497
+ when 3
498
+ begin
499
+ end
500
+ end
501
+ end
502
+ end
503
+ if _goto_level <= _out
504
+ break
505
+ end
506
+ end
507
+ end
514
508
 
515
509
  if p != eof || cs < 21
516
510
  raise Mail::Field::IncompleteParseError.new(Mail::ContentTransferEncodingElement, data, p)