Artifacts Associated With Ticket 15e4bd83c28d0a81
Ticket change [d07780f83b] (rid 195791) by oehhar on 2021-10-04 16:32:16:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Sorry for the following detail: <verbatim> http::geturl $URL -query {} </verbatim> sends a get request and not a post request. The documentation of 8.6.11 is: [https://www.tcl-lang.org/man/tcl8.6/TclCmd/http.htm#M29] <verbatim> -query query This flag causes ::http::geturl to do a POST request... </verbatim> In this corner case, it does not. It sends a get request. I suppose, we can not change the behaviour. It might be beneficial to change the wording to say that an empty query sends a get request. Any comments welcome. Best regards, Harald Note: for my personal use, it would be handy to send a post request with empty payload. - foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "oehhar"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
- resolution initialized to: "None"
- severity initialized to: "Cosmetic"
- status initialized to: "Open"
- submitter initialized to: "oehhar"
- subsystem initialized to: "29. http Package"
- title initialized to:
http::geturl: Documentation discrepancy on -query {} - type initialized to: "Bug"
Ticket change [a343f96571] (rid 200553) by kjnash on 2022-05-10 19:29:25:
- icomment:
Hi Harald, I've just looked at RFC 7230-3 and I cannot see anything that forbids a POST request with no message body. However, it is an unusual case: do you use custom request headers to modify the state of the server? The behaviour of http::geturl could be changed, but this is a change of API that might break some existing code, and would require an increase in the major version of the http package. Fortunately, you can use the existing http::geturl to send POST with an empty body by using the options "-method POST -headers {Content-Length 0}". <verbatim> -method type Force the HTTP request method to type. ::http::geturl will auto-select GET, POST or HEAD based on other options, but this option enables choices like PUT and DELETE for webdav support. </verbatim> I will modify the man page http(n) to state that the value for -query must be non-empty to cause the POST method. Best wishes, Keith. - login: "kjnash"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [a99b2800b6] (rid 200597) by kjnash on 2022-05-12 01:36:19:
- icomment:
Documentation http(n) changed: For -query, to say that an empty query does not sent a POST, see commit [1b15e55938a9b2fc]. For -method, to describe the case of a POST with no request-body, see commit [751f947bc87f6b2f].
- login: "kjnash"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [cdd2b8588c] (rid 200602) by kjnash on 2022-05-12 01:41:47:
- login: "kjnash"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
Ticket change [7e441e04e8] (rid 200607) by oehhar on 2022-05-12 12:59:55:
- icomment:
Great, I appreciate ! My use-case was the testing of the TCLWS package and what it does, if there is no data. Thanks, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [3f6f4c7823] (rid 200612) by kjnash on 2022-05-13 02:58:39:
- login: "kjnash"
- mimetype: "text/plain"
- status changed to: "Pending"
Ticket change [d29107612a] (rid 201354) by kjnash on 2022-05-30 16:23:42:
- closedate changed to: "2459730.18313418"
- closer changed to: "kjnash"
- login: "kjnash"
- mimetype: "text/plain"
- status changed to: "Closed"