Warning, /frameworks/kio/docs/metadata.txt is written in an unsupported language. File is not indexed.

0001 METADATA
0002 ========
0003 
0004 Applications can provide "metadata" to the workers. Metadata can influence
0005 the behavior of a worker and is usually protocol dependent. MetaData consists
0006 of two strings: a "key" and a "value".
0007 
0008 Any meta data whose "key" starts with the keywords {internal~currenthost} and
0009 "{internal~allhosts}" will be treated as internal metadata and will not be made
0010 available to client applications. Instead all such meta-data will be stored and
0011 sent back to the appropriate KIO workers along with the other regular metadata values.
0012 
0013 Use "{internal~currenthost}" to make the internal metadata available to all
0014 KIO workers of the same protocol and host as the workers that generated it. If
0015 you do not want to restrict the availability of the internal metadata to only
0016 the current host, then use {internal~allhosts}. In either case the internal
0017 metadata follows the rules of the regular metadata and therefore cannot be sent
0018 from one protocol such as "http" to a completely different one like "ftp".
0019 
0020 Please note that when internal meta-data values are sent back to KIO workers, the
0021 keyword used to mark them internal will be stripped from the key name.
0022 
0023 The following keys are currently in use:
0024 
0025 Key             Value(s)        Description
0026 ----            --------        -----------
0027 
0028 referrer        string          The URL from which the request originates. (read by http)
0029 
0030 modified        string          The modification date of the document (set by http and by kio before put)
0031 
0032 accept          string          List of MIME types to accept separated by a ", ". (read by http)
0033 
0034 responsecode    string          Original response code of the web server. (set by http)
0035 
0036 SendUserAgent   bool            Whether to send a User-Agent (read by http)
0037 UserAgent       string          The user agent name to send to remote host (read by http)
0038 
0039 content-type    string          The content type of the data to be uploaded (read and set by http)
0040 media-*         string          Media-Parameter attributes (e.g. media-boundary)
0041 media-*-kio-quoted  bool        The corresponding media- attribute's value was quoted. (set by http)
0042 
0043 cache           "cache"         Use entry from cache if available.
0044                 "cacheonly"     Do not do any remote lookups, fail if not in cache. (read by http)
0045                 "verify"        Use entry from cache, verify with remote server if expired
0046                 "refresh"       Use entry from cache after verifying with remote server
0047                 "reload"        Do not do any cache lookups.
0048 
0049 no-cache        bool            Flag that indicates whether caching is enabled/disabled
0050 
0051 window-id       number          winId() of the window the request is associated with.
0052 
0053 range-start     number          Try to get the file starting at the given offset (set by file_copy when finding a .part file,
0054                                                                                   but can also be set by apps.)
0055 
0056 range-end       number          Try to get the file until at the given offset (not set in kdelibs; handled by kio_http).
0057 
0058 resume          number          Deprecated compatibility name for range-start
0059 resume_until    number          Deprecated compatibility name for range-end
0060 
0061 charset         string          Charset of the current content as returned by a HTTP Header Response.
0062 
0063 Charsets        string          Charset(s) send in the "Accept-Charset:" HTTP Request Header.
0064 
0065 Languages       string          Language(s) send in the "Accept-Language:" HTTP Request Header.
0066 
0067 content-disposition-type        string Type of Content-Disposition from a HTTP Header Response.
0068 content-disposition-*           any other valid value sent in a Content-Disposition header (e.g. filename)
0069 
0070 request-id      number              Sequence number to identify requests in a MultiGet command.
0071 
0072 expire-date     number              Date on which a cache entry needs validation.
0073 
0074 cache-creation-date  number     Date on which a cache entry has been created.
0075 
0076 http-refresh    string          Passes HTTP Refresh meta-data back to the application.
0077 
0078 cookies         "auto"          Use kcookiejar to lookup and collect cookies (default)
0079                 "manual"        Cookies set in "setcookies" are send, received cookies are reported
0080                                 via "setcookies".
0081                 "none"          No cookies are sent, received cookies are discarded.
0082 
0083 setcookies      string          Used to send/receive HTTP cookies when "cookies" is set to "manual".
0084 
0085 errorPage       bool            Flag that indicates that an errorPage() is preferred over an error().                                      (default:true)
0086 
0087 no-auth         bool            Flag that indicates that no authentication (neither WWW nor proxy) attempts should be made.
0088 no-www-auth     bool            Flag that indicates that no HTTP WWW authentication attempts should be made.
0089 no-proxy-auth   bool            Flag that indicates that no HTTP proxy authentication attempts should be made.
0090 no-auth-prompt  bool            Flag that indicates that only cached authentication tokens should be used.
0091 no-preemptive-auth-reuse  bool  Flag that indicates whether cached credentials should be preemptively sent to the server.
0092 
0093 ssl_activate_warnings bool      Flag that disables SSL warning dialogs if set to false.  (default: true)
0094 
0095 ssl_was_in_use  bool            Flag to tell TCPWorkerBase if SSL was in use in the previous transaction.
0096                                 (default: false)
0097 
0098 ssl_in_use      bool            Set in TCPWorkerBase to tell the caller if SSL is in use.
0099                                 (default: assume false)
0100 
0101 ssl_using_client_cert  bool     Set in TCPWorkerBase to tell the caller if the session is using a client                                    certificate   (default: assume false)
0102 
0103 ssl_no_client_cert  bool        Flag to tell TCPWorkerBase if it should, under no circumstances, use a
0104                                 client certificate.  (default: false)
0105 
0106 ssl_demand_certificate  bool    Flag to tell TCPWorkerBase to demand that a client certificate is used for this connection.  (default: false)
0107 
0108 ssl_no_ui       bool            Flag to tell TCPworkerBase that no user interaction should take place. Instead of asking security questions the connection will silently fail. This is of particular use to favicon code. (default: false)
0109 
0110 ssl_cipher      string          Set in TCPWorkerBase to tell the caller which cipher is currently being used.
0111                                 This string is composed of the encryption, authentication, key-exchange and digest
0112                                 methods separated by an LF (\n).
0113 
0114 ssl_cipher_name string          Set in TCPWorkerBase to tell the caller the name of the cipher used.
0115 
0116 ssl_cipher_desc string          Set in TCPWorkerBase to describe the details of the current cipher being used.
0117 
0118 ssl_cipher_version      string  Set in TCPWorkerBase to describe the version of the cipher being used.
0119 
0120 ssl_cipher_used_bits    integer Set in TCPWorkerBase to relay the number of bits of the key actually being used in this cipher and connection.
0121 
0122 ssl_cipher_bits integer         Set in TCPWorkerBase to relay the number of bits the key is capable of in this cipher and connection.
0123 
0124 ssl_peer_ip     string          Set in TCPWorkerBase to tell the caller the IP address of the peer.
0125 
0126 ssl_cert_state  integer         Set in TCPWorkerBase to relay the state of the certificate check, without considering the cache settings.  Can be checked with KSSLCertificate enumeration.
0127 
0128 ssl_peer_certificate    string  Set in TCPWorkerBase to relay the base64 encoding of the X.509 certificate presented by the peer.
0129 
0130 ssl_peer_chain  string          Set, if present, in TCPWorkerBase to relay the entire certificate chain presented by the peer.  The is base64 encoded and \n delimited.
0131 
0132 ssl_parent_ip   string          Set in TCPWorkerBase and in the caller.  If this is the parent frame of a frame of the session (really only applies to https), this variable is set so that it can be passed back to the child frames.  It is necessary to send it to child frames so that they can do a full certificate check.
0133 
0134 ssl_parent_cert string          Set in TCPWorkerBase and in the caller.  As above, this must be passed to child frames by the caller so that it can compare against the certificate presented in the child frames.  It is a base64 encoding of the X.509 presented.
0135 
0136 ssl_session_id  string          Set in TCPWorkerBase to indicate the SSL session ID in base64 encoded ASN.1 encoded binary format.  Also set in the caller to indicate to TCPWorkerBase to reuse a particular session ID.
0137 
0138 main_frame_request      bool    Actually for SSL, this is set in the caller to tell TCPWorkerBase if this is the request for the main frame of an html page. (dfault: true)
0139 
0140 HTTP-Version            string  The HTTP version in use for kio_http (set by http)
0141 
0142 PropagateHttpHeader     bool    Whether HTTP headers should be send back (read by http)
0143 
0144 HTTP-Headers            string  The HTTP headers, concatenated, \n delimited (set by http)
0145                                 Requires PropagateHttpHeader to be set.
0146 
0147 customHTTPHeader        string  Custom HTTP headers to add to the request (read by http)
0148 
0149 CustomHTTPMethod        string  Overrides the method string sent by kio_http 
0150                                 without changing the behavior (read by http)
0151 
0152 UseProxy                string  URL representing the proxy settings (read by http)
0153 ProxyUrls               string  a comma separated list of proxy urls. The first url in this list matches one set in "UseProxy".
0154 
0155 PrivacyPolicy           stringlist  \n delimited URIs referring to P3P privacy
0156                                 policies presented by the HTTP server
0157 
0158 PrivacyCompactPolicy    stringlist  \n delimited P3P compact tag policies
0159                                 presented by the HTTP server
0160 
0161 textmode                bool    When true, switches FTP up/downloads to ascii transfer mode (read by ftp)
0162 
0163 recurse                 bool    When true, del() will be able to delete non-empty directories.  (read by file)
0164                                 Otherwise, del() is supposed to give an error on non-empty directories.
0165 
0166 DefaultRemoteProtocol   string  Protocol to redirect file://<hostname>/ URLs to, default is "smb" (read by file)
0167 no-spoof-check          bool    Flag to indicate whether a username spoofing check should be performed, default is FALSE.(read by http)
0168 redirect-to-get         bool    If "true", changes a redrirection request to a GET operation regardless of the original operation.
0169 
0170 ** NOTE: Anything in quotes ("") under Value(s) indicates literal value.
0171 
0172 
0173 Examples:
0174 
0175 E.g. the following disables cookies:
0176 job = KIO::get( QUrl("http://www.kde.org") );
0177 job->addMetaData("cookies", "none");
0178 
0179 If you want to handle cookies yourself, you can do:
0180 job = KIO::get( QUrl("http://www.kde.org") );
0181 job->addMetaData("cookies", "manual");
0182 job->addMetaData("setcookies", "Cookie: foo=bar; gnat=gnork");
0183 
0184 The above sends two cookies along with the request, any cookies send back by
0185 the server can be retrieved with job->queryMetaData("cookies") after
0186 receiving the mimetype() signal or when the job is finished.
0187 
0188 The cookiejar is not used in this case.