summaryrefslogtreecommitdiffstats
path: root/tdeio/DESIGN.metadata
blob: 783d7f52a66aa33a600deddf21f182164262f54f (plain)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
METADATA
========

Applications can provide "metadata" to the slaves. Metadata can influence
the behavior of a slave and is usally protocol dependent. MetaData consists
of two strings: a "key" and a "value".


The following keys are currently in use:

Key             Value(s)        Description
----            --------        -----------

referrer        string          The URL from which the request originates. (read by http)

modified        string          The modification date of the document (set by http)

accept          string          List of mimetypes to accept separated by a ", ". (read by http)

SendUserAgent	bool		Whether to send a User-Agent (read by http)
UserAgent       string          The user agent name to send to remote host (read by http)

content-type    string          The content type of the data to be uploaded (read by http)
media-*         string          Media-Parameter attributes (e.g. media-boundary)

cache           "cache"         Use entry from cache if available.
                "cacheonly"     Do not do any remote lookups, fail if not in cache. (read by http)
                "verify"        Use entry from cache, verify with remote server if expired
                "refresh"       Use entry from cache after verifying with remote server
                "reload"        Do not do any cache lookups.

no-cache        bool            Flag that indicates whether caching is enabled/disabled

window-id       number          winId() of the window the request is associated with.

resume          number          Try to get the file starting at the given offset (set by TransferJob)

charset         string          Charset of the current content as returned by a HTTP Header Response.

Charsets        string          Charset(s) send in the "Accept-Charset:" HTTP Request Header.

Languages       string          Language(s) send in the "Accept-Language:" HTTP Request Header.

content-
disposition     string          Suggested name to Save a file as as returned by a HTTP Header Response.

request-id	number		Sequence number to identify requests in a MultiGet command.

expire-date	number		Date on which a cache entry needs validation.

cache-creation-date	number	Date on which a cache entry has been created.

http-refresh    string          Passes HTTP Refresh meta-data back to the application.

cookies		"auto"		Use kcookiejar to lookup and collect cookies (default)
		"manual"	Cookies set in "setcookies" are send, received cookies are reported via "setcookies".
		"none"		No cookies are send, received cookies are discarded.

setcookies	string		Used to send/receive HTTP cookies when "cookies" is set to "manual".

errorPage	bool		Flag that indicates that an errorPage() is preferred over an error(). (default:true)

no-auth		bool		Flag that indicates that no authentication attempts should be made.
no-auth-prompt	bool		Flag that indicates that only cached authentication tokens should be used.

ssl_activate_warnings	bool	Flag that disables SSL warning dialogs if set to false.  (default: true)

ssl_was_in_use	bool		Flag to tell TCPSlaveBase if SSL was in use in the previous transaction.  (default: false)

ssl_in_use	bool		Set in TCPSlaveBase to tell the caller if SSL is in use.  (default: assume false)

ssl_using_client_cert	bool	Set in TCPSlaveBase to tell the caller if the session is using a client certificate   (default: assume false)

ssl_no_client_cert	bool	Flag to tell TCPSlaveBase if it should, under no circumstances, use a client certificate.  (default: false)

ssl_force_cert_prompt	bool	Flag to tell TCPSlaveBase to force the client certificate dialog to appear on this connection.  ssl_no_client_cert overrides this flag.  This does not force the user to actually choose a certificate.  (default: false)

ssl_demand_certificate	bool	Flag to tell TCPSlaveBase to demand that a client certificate is used for this connection.  (default: false)

ssl_militant	bool		Flag to tell TCPSlaveBase "do it right, or don't do it at all".  This means that if the certificate check or any other security test fails, just silently fail the connection.  This is of particular use to favicon code.  (default: false)

ssl_cipher	string		Set in TCPSlaveBase to tell the caller which cipher is currently being used.

ssl_cipher_desc	string		Set in TCPSlaveBase to describe the details of the current cipher being used.

ssl_cipher_version	string	Set in TCPSlaveBase to describe the version of the cipher being used.

ssl_cipher_used_bits	integer	Set in TCPSlaveBase to relay the number of bits of the key actually being used in this cipher and connection.

ssl_cipher_bits	integer		Set in TCPSlaveBase to relay the number of bits the key is capable of in this cipher and connection.

ssl_peer_ip	string		Set in TCPSlaveBase to tell the caller the IP address of the peer.

ssl_cert_state	integer		Set in TCPSlaveBase to relay the state of the certificate check, without considering the cache settings.  Can be checked with KSSLCertificate enumeration.

ssl_peer_certificate	string	Set in TCPSlaveBase to relay the base64 encoding of the X.509 certificate presented by the peer.

ssl_peer_chain	string		Set, if present, in TCPSlaveBase to relay the entire certificate chain presented by the peer.  The is base64 encoded and \n delimited.

ssl_action	string		Set in TCPSlaveBase to determine what the user wishes to do about the connection.  Enumerated to {"accept", "reject"} currently.

ssl_parent_ip	string		Set in TCPSlaveBase 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.

ssl_parent_cert	string		Set in TCPSlaveBase 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.

ssl_session_id	string		Set in TCPSlaveBase to indicate the SSL session ID in base64 encoded ASN.1 encoded binary format.  Also set in the caller to indicate to TCPSlaveBase to reuse a particular session ID.

ssl_proxied	bool		Presently exists only if true.  Set in TCPSlaveBase to indicate that a proxy is in use for this SSL connection.

main_frame_request	bool	Actually for SSL, this is set in the caller to tell TCPSlaveBase if this is the request for the main frame of an html page. (dfault: true)

HTTP-Version		string	The HTTP version in use for kio_http (set by http)

PropagateHttpHeader	bool	Whether HTTP headers should be send back (read by http)

HTTP-Headers		string	The HTTP headers, concatenated, \n delimited (set by http)
                                Requires PropagateHttpHeader to be set.

PrivacyPolicy		stringlist  \n delimited URIs referring to P3P privacy
                                policies presented by the HTTP server

PrivacyCompactPolicy	stringlist  \n delimited P3P compact tag policies
                                presented by the HTTP server

textmode		bool	When true, switches FTP up/downloads to ascii transfer mode (read by ftp)

DefaultRemoteProtocol	string	Protocol to redirect file://<hostname>/ URLs to, default is "smb" (read by file)

** NOTE: Anything in quotes ("") under Value(s) indicates literal value.


Examples:

E.g. the following disables cookies:
job = TDEIO::get( KURL("http://www.kde.org"), false, false);
job->addMetaData("cookies", "none");

If you want to handle cookies yourself, you can do:
job = TDEIO::get( KURL("http://www.kde.org"), false, false);
job->addMetaData("cookies", "manual");
job->addMetaData("setcookies", "Cookie: foo=bar; gnat=gnork");

The above sends two cookies along with the request, any cookies send back by
the server can be retrieved with job->queryMetaData("cookies") after
receiving the mimetype() signal or when the job is finished.

The cookiejar is not used in this case.