summaryrefslogtreecommitdiffstats
path: root/doc/http.n
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2022-09-10 11:47:34 (GMT)
committerkjnash <k.j.nash@usa.net>2022-09-10 11:47:34 (GMT)
commitd288bedb47342cb10920f38467bcbfcded335e97 (patch)
tree50c9b089abf6388c02490d893490d7ddab4ad206 /doc/http.n
parent6ed82bc4e590af32ae2a7742913dbd3388d6ce81 (diff)
downloadtcl-d288bedb47342cb10920f38467bcbfcded335e97.zip
tcl-d288bedb47342cb10920f38467bcbfcded335e97.tar.gz
tcl-d288bedb47342cb10920f38467bcbfcded335e97.tar.bz2
Add option to detect XML files and their encoding when the server supplies no content-type. Fix for bugs [2998307] and [3165071].
Diffstat (limited to 'doc/http.n')
-rw-r--r--doc/http.n13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/http.n b/doc/http.n
index 135774d..5b70671 100644
--- a/doc/http.n
+++ b/doc/http.n
@@ -273,6 +273,19 @@ not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
details.
.RE
.TP
+\fB\-guesstype\fR \fIboolean\fR
+.
+Attempt to guess the Content-Type and character set when a misconfigured
+server provides no information. The default value is \fIfalse\fR (do
+nothing). If boolean \fItrue\fR then, if the server does not send a
+"Content-Type" header, or if it sends the value "application/octet-stream",
+\fBhttp::geturl\fR will attempt to guess appropriate values. This is not
+intended to become a general-purpose tool, and currently it is limited to
+detecting XML documents that begin with an XML declaration. In this case
+the Content-Type is changed to "application/xml", and the character set to
+the one specified by the "encoding" tag of the XML line, or to utf-8 if no
+encoding is specified.
+.TP
\fB\-handler\fR \fIcallback\fR
.
Invoke \fIcallback\fR whenever HTTP data is available; if present, nothing