Artifacts Associated With Ticket 4e5007ea1b285527
Ticket change [da77134a81] (rid 141201) by oehhar on 2015-02-16 14:45:48:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
The http::formatQuery command is documented as: <verbatim> http::formatQuery key value ?key value ...? </verbatim> The function is also usable as: <verbatim> http::formatQuery string </verbatim> which just does the %xx translation for string. For me (and Rolf via chat), this is a helpful use case. Could we make this offical and document this use case ? Thank you, Harald
- foundin initialized to: "8.6.3"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "29. http Package"
- title initialized to: "Document use case: http::formatQuery key"
- type initialized to: "Bug"
Ticket change [bf43f01fe6] (rid 154683) by gwlester on 2017-06-19 22:24:35:
- assignee changed to: "gwlester"
- icomment:
Fixed in TIP 452 branch by having formatQuery raise an error if passed an odd number of arguments. Creating new ticket to request that ::http::quoteString be exposed that will just do the %XX translation for a string.
- login: "gwlester"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Pending"
- username: "gwlester"
Ticket change [3b9a9ac3ab] (rid 154686) by dkf on 2017-06-19 22:30:17:
- icomment:
I guess that we can review how we do the quoting once this hits a main branch. It's the sort of thing for which I did <tt>regsub -command</tt> after all.
- login: "dkf"
- mimetype: "text/html"
- username: "dkf"
- icomment:
Ticket change [274745caf9] (rid 160335) by oehhar on 2018-01-19 13:36:59:
- icomment:
I would really enjoy to legalize this use-case. Should I start a tip ? Thank you, Harald
- login: "oehhar"
- mimetype: "text/plain"
- username: "oehhar"
- icomment:
Ticket change [371c27948e] (rid 200560) by kjnash on 2022-05-10 21:16:47:
- icomment:
Hi Harald, Does the "new" command ::http::quoteString do what you need? If so, this bug can be closed. Best wishes, Keith.
- login: "kjnash"
- mimetype: "text/plain"
- icomment:
Ticket change [3f02f3bf30] (rid 200606) by oehhar on 2022-05-12 12:37:15:
- icomment:
Thank you, Nash, for the message, first, I am amazed about all the patches this week, great. To answer the discrete question: I look to the msgcat code in [dcc2f0bb90d2ced6]. http::quoteString is aliased on http::mapReply. The function is great and what is IMHO helpful. But mapReply starts with: <verbatim> if {$http(-urlencoding) ne ""} { </verbatim> so, the http array must exist to use it. So, IMHO, it can not be used as an utility function disconnected from a http request (what was my intention). As a side note, I am not sure what the "encoding convertto" following it does. If there is encoding envolved, I would do that after the percent encoding, not before, as an encoding applies to the percent encoded characters to. Just my two pence, Harald - login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [e34fa4aed8] (rid 200610) by kjnash on 2022-05-12 13:36:03:
- icomment:
Hi Harald, I'm not sure what your use case is. How would this command be useful for msgcat? The array ::http::http is defined when package http is loaded: there is no need to make a HTTP request. You can use http::mapReply without ever making a request. The "encoding convertto" is essential to produce a %-encoded string that corresponds to a sequence of bytes <i>in a specific character set</i>. Normally we use the default utf-8, e.g. <verbatim> % package require http 2.10a1 % http::mapReply © %C2%A9 </verbatim> But if the recipient is expecting a different character set, the command can do that too: <verbatim> % http::config -urlencoding iso8859-1 % http::mapReply © %A9 </verbatim> In HTTP applications there is no need to do encoding after the percent-encoding, because the latter produces a string in a subset of ASCII that HTTP clients and servers are required by the RFCs to understand. Kind regards, Keith.
- login: "kjnash"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [a3b8680944] (rid 200611) by oehhar on 2022-05-12 16:12:30:
- icomment:
Sorry, Nash, all ok. My Covid-limitted brain just did not get it and thought the other way around. Like that it is ok and helpful. Thank you for all the work and take care, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [181c3d7216] (rid 200618) by jan.nijtmans on 2022-05-13 08:57:59:
- icomment:
Thanks, @kjnash, for taking all those tickets regarding the http package. Whenever you feel that the documentation is OK, just go ahead. I'm GTG.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [df5e0d9264] (rid 201359) by kjnash on 2022-05-30 16:25:57:
- closedate changed to: "2459730.18469302"
- closer changed to: "kjnash"
- login: "kjnash"
- mimetype: "text/plain"
- status changed to: "Closed"