84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
puts -nonewline $channel $data
close $channel
return ""
}
}
#
# NOTE: This procedure was stolen from the "getEagle.tcl" script. This
# procedure sets up the default values for all HTTP configuration
# parameters used by this package. If the force argument is
# non-zero, any existing values will be overwritten and set back
# to their default values.
#
proc setupCommonVariables { force } {
#
|
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
puts -nonewline $channel $data
close $channel
return ""
}
}
#
# NOTE: This procedure was stolen from the "common.tcl" script. This
# procedure sets up the default values for all HTTP configuration
# parameters used by this package. If the force argument is
# non-zero, any existing values will be overwritten and set back
# to their default values.
#
proc setupCommonVariables { force } {
#
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
if {![info exists allowInsecureRedirect]} then {
set allowInsecureRedirect false
}
}
#
# NOTE: This procedure was stolen from the "getEagle.tcl" script. It is
# designed to emit a message to the console. The channel argument
# is the channel where the message should be written. The string
# argument is the content of the message to emit. If the channel
# argument is an empty string, nothing is written.
#
proc pageOut { channel string } {
if {[string length $channel] > 0} then {
catch {
puts -nonewline $channel $string; flush $channel
}
}
}
#
# NOTE: This procedure was stolen from the "getEagle.tcl" script. It is
# designed to emit a message to the HTTP client log. The string
# argument is the content of the message to emit. If the string
# argument is an empty string, nothing is written.
#
proc pageLog { string } {
if {[string length $string] > 0} then {
catch {
tclLog [appendArgs \
[pid] " : " [clock seconds] " : http : " $string]
}
}
}
#
# NOTE: This procedure was stolen from the "getEagle.tcl" script. It is
# designed to emit a progress indicator while an HTTP request is
# being processed. The channel argument is the Tcl channel where
# the progress indicator should be emitted. The type argument is
# the single-character progress indicator. The milliseconds
# argument is the number of milliseconds to wait until the next
# periodic progress indicator should be emitted. This procedure
# reschedules its own execution.
|
|
|
|
|
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
if {![info exists allowInsecureRedirect]} then {
set allowInsecureRedirect false
}
}
#
# NOTE: This procedure was stolen from the "common.tcl" script. It is
# designed to emit a message to the console. The channel argument
# is the channel where the message should be written. The string
# argument is the content of the message to emit. If the channel
# argument is an empty string, nothing is written.
#
proc pageOut { channel string } {
if {[string length $channel] > 0} then {
catch {
puts -nonewline $channel $string; flush $channel
}
}
}
#
# NOTE: This procedure was stolen from the "common.tcl" script. It is
# designed to emit a message to the HTTP client log. The string
# argument is the content of the message to emit. If the string
# argument is an empty string, nothing is written.
#
proc pageLog { string } {
if {[string length $string] > 0} then {
catch {
tclLog [appendArgs \
[pid] " : " [clock seconds] " : http : " $string]
}
}
}
#
# NOTE: This procedure was stolen from the "common.tcl" script. It is
# designed to emit a progress indicator while an HTTP request is
# being processed. The channel argument is the Tcl channel where
# the progress indicator should be emitted. The type argument is
# the single-character progress indicator. The milliseconds
# argument is the number of milliseconds to wait until the next
# periodic progress indicator should be emitted. This procedure
# reschedules its own execution.
|
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
$milliseconds]]]
} else {
unset -nocomplain afterForPageProgress
}
}
#
# NOTE: This procedure was stolen from the "getEagle.tcl" script. It is
# designed to process a single HTTP request, including any HTTP
# 3XX redirects (up to the specified limit), and return the raw
# HTTP response data. It may raise any number of script errors.
#
# <public>
proc getFileViaHttp { uri redirectLimit channel quiet args } {
#
|
|
|
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
$milliseconds]]]
} else {
unset -nocomplain afterForPageProgress
}
}
#
# NOTE: This procedure was stolen from the "common.tcl" script. It is
# designed to process a single HTTP request, including any HTTP
# 3XX redirects (up to the specified limit), and return the raw
# HTTP response data. It may raise any number of script errors.
#
# <public>
proc getFileViaHttp { uri redirectLimit channel quiet args } {
#
|