-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfile.java_options.html
129 lines (106 loc) · 7.82 KB
/
file.java_options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>
<meta name='apple-touch-fullscreen' content='yes'>
<meta name='apple-mobile-web-app-capable' content='yes'>
<meta name='apple-mobile-web-app-status-bar-style' content='rgba(228,228,228,1.0)'>
<title>File: Java Options — Puma master</title>
<link rel='stylesheet' type='text/css' href='../css/y_fonts.css' />
<link rel='stylesheet' type='text/css' href='../css/highlight.github.css' />
<link rel='stylesheet' type='text/css' href='../css/y_style.css' />
<link rel='stylesheet' type='text/css' href='../css/y_list.css' />
<link rel='stylesheet' type='text/css' href='../css/y_color.css' />
<script type='text/javascript'>
var pathId = "java_options",
relpath = '';
var t2Info = {
CSEP: '.',
ISEP: '#',
NSEP: '::'
};
</script>
<script type='text/javascript' charset='utf-8' src='../js/highlight.pack.js'></script>
<script type='text/javascript' charset='utf-8' src='../js/y_app.js'></script>
</head>
<body>
<svg id='y_wait' class viewBox='0 0 90 90'></svg>
<div id='settings' class='hidden'></div>
<div id='y_list' class='d h'>
<header id='list_header'></header>
<nav id= 'list_nav' class='y_nav l_nav'>
<ul id='list_items'></ul>
</nav>
</div>
<div id='y_toc' class='f h'>
<header id='toc_header'></header>
<nav id= 'toc_nav' class='y_nav t_nav'>
<ol id='toc_items'></ol>
</nav>
</div>
<div id='y_main' tabindex='-1'>
<header id='y_header'>
<div id='y_menu'>
<a id='home_no_xhr' href='/'>Home</a> »
<a href='.'>Puma master</a> »
<a href='_index.html'>Index</a> »
<span class='title'><a id='t2_doc_top' href='#'>File: Java Options ▲</a></span>
</div>
<a id='list_href' href="class_list.html"></a>
<div id='y_measure_em' class='y_measure'></div>
<div id='y_measure_vh' class='y_measure'></div>
<span id='y_measure_50pre' class='y_measure'><code>123456789_123456789_123456789_123456789_123456789_</code></span>
</header>
<div id='content' class='file'>
<h1>Java Options</h1>
<p><code>System Properties</code> or <code>Environment Variables</code> can be used to change Puma's
default configuration for its Java extension. The provided values are evaluated
during initialization, and changes while running the app have no effect.
Moreover, default values may be used in case of invalid inputs.</p>
<h2>Supported Options</h2>
<table><thead>
<tr>
<th>ENV Name</th>
<th style="text-align: center">Default Value</th>
<th style="text-align: center">Validation</th>
</tr>
</thead><tbody>
<tr>
<td>PUMA_QUERY_STRING_MAX_LENGTH</td>
<td style="text-align: center">1024 * 10</td>
<td style="text-align: center">Positive natural number</td>
</tr>
<tr>
<td>PUMA_REQUEST_PATH_MAX_LENGTH</td>
<td style="text-align: center">8192</td>
<td style="text-align: center">Positive natural number</td>
</tr>
<tr>
<td>PUMA_REQUEST_URI_MAX_LENGTH</td>
<td style="text-align: center">1024 * 12</td>
<td style="text-align: center">Positive natural number</td>
</tr>
</tbody></table>
<h2>Examples</h2>
<h3>Invalid inputs</h3>
<p>An empty string will be handled as missing, and the default value will be used instead.
<a href="Puma.html" title="Puma (module)"><code>Puma</code></a> will print an error message for other invalid values.</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_foo'>foo</span><span class='ivar'>@bar</span><span class='op'>:</span><span class='op'>~</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>puma$ PUMA_QUERY_STRING_MAX_LENGTH=abc PUMA_REQUEST_PATH_MAX_LENGTH='' PUMA_REQUEST_URI_MAX_LENGTH=0 bundle exec bin</span><span class='regexp_end'>/puma</span></span> <span class='id identifier rubyid_test'>test</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>rackup</span><span class='regexp_end'>/hello</span></span>.<span class='id identifier rubyid_ru'>ru</span>
<span class='const'>The</span> <span class='id identifier rubyid_value'>value</span> <span class='int'>0</span> <span class='kw'>for</span> <span class='const'>PUMA_REQUEST_URI_MAX_LENGTH</span> <span class='id identifier rubyid_is'>is</span> <span class='id identifier rubyid_invalid'>invalid</span>. <span class='const'>Using</span> <span class='id identifier rubyid_default'>default</span> <span class='id identifier rubyid_value'>value</span> <span class='int'>12288</span> <span class='id identifier rubyid_instead'>instead</span>.
<span class='const'>The</span> <span class='id identifier rubyid_value'>value</span> <span class='id identifier rubyid_abc'>abc</span> <span class='kw'>for</span> <span class='const'>PUMA_QUERY_STRING_MAX_LENGTH</span> <span class='id identifier rubyid_is'>is</span> <span class='id identifier rubyid_invalid'>invalid</span>. <span class='const'>Using</span> <span class='id identifier rubyid_default'>default</span> <span class='id identifier rubyid_value'>value</span> <span class='int'>10240</span> <span class='id identifier rubyid_instead'>instead</span>.
<span class='const'><a href="Puma.html" title="Puma (module)">Puma</a></span> <span class='id identifier rubyid_starting'>starting</span> <span class='kw'>in</span> <span class='id identifier rubyid_single'>single</span> <span class='id identifier rubyid_mode'>mode</span><span class='op'>...</span></code></pre>
<h3>Valid inputs</h3>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_foo'>foo</span><span class='ivar'>@bar</span><span class='op'>:</span><span class='op'>~</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>puma$ PUMA_REQUEST_PATH_MAX_LENGTH=9 bundle exec bin</span><span class='regexp_end'>/puma</span></span> <span class='id identifier rubyid_test'>test</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>rackup</span><span class='regexp_end'>/hello</span></span>.<span class='id identifier rubyid_ru'>ru</span>
<span class='const'><a href="Puma.html" title="Puma (module)">Puma</a></span> <span class='id identifier rubyid_starting'>starting</span> <span class='kw'>in</span> <span class='id identifier rubyid_single'>single</span> <span class='id identifier rubyid_mode'>mode</span><span class='op'>...</span></code></pre>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_foo'>foo</span><span class='ivar'>@bar</span><span class='op'>:</span><span class='op'>~</span> <span class='id identifier rubyid_export'>export</span> <span class='id identifier rubyid_path'>path</span><span class='op'>=</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>123456789 # 10 chars
foo@bar:~ curl "http:</span><span class='regexp_end'>/</span></span><span class='op'>/</span><span class='id identifier rubyid_localhost'>localhost</span><span class='symbeg'>:</span><span class='int'>9292</span><span class='gvar'>$</span>{<span class='id identifier rubyid_path'>path</span>}<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
Puma caught this error: HTTP element REQUEST_PATH is longer than the 9 allowed length. (Puma::HttpParserError)
foo@bar:~ export path=/12345678 # 9 chars
foo@bar:~ curl </span><span class='tstring_end'>"</span></span><span class='id identifier rubyid_http'>http</span><span class='symbeg'>:</span><span class='op'>/</span><span class='op'>/</span><span class='id identifier rubyid_localhost'>localhost</span><span class='symbeg'>:</span><span class='int'>9292</span><span class='gvar'>$</span>{<span class='id identifier rubyid_path'>path</span>}<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>
Hello World</span></code></pre>
<div id='footer'></div>
</div> <!-- content -->
</div> <!-- y_main -->
</body>
</html>