Skip to content
Tcl Source Code History Of Ticket 15e4bd83c2
Login

History Of Ticket 15e4bd83c2

Artifacts Associated With Ticket 15e4bd83c2

  1. Ticket change [d07780f83b] (rid 195791) by oehhar on 2021-10-04 16:32:16:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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.
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "oehhar"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
    10. resolution initialized to: "None"
    11. severity initialized to: "Cosmetic"
    12. status initialized to: "Open"
    13. submitter initialized to: "oehhar"
    14. subsystem initialized to: "29. http Package"
    15. title initialized to:
      http::geturl: Documentation discrepancy on -query {}
      
    16. type initialized to: "Bug"
  2. Ticket change [a343f96571] (rid 200553) by kjnash on 2022-05-10 19:29:25:

    1. 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.
      
    2. login: "kjnash"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [a99b2800b6] (rid 200597) by kjnash on 2022-05-12 01:36:19:

    1. 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].
      
    2. login: "kjnash"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [cdd2b8588c] (rid 200602) by kjnash on 2022-05-12 01:41:47:

    1. login: "kjnash"
    2. mimetype: "text/plain"
    3. resolution changed to: "Fixed"
  5. Ticket change [7e441e04e8] (rid 200607) by oehhar on 2022-05-12 12:59:55:

    1. 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
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  6. Ticket change [3f6f4c7823] (rid 200612) by kjnash on 2022-05-13 02:58:39:

    1. login: "kjnash"
    2. mimetype: "text/plain"
    3. status changed to: "Pending"
  7. Ticket change [d29107612a] (rid 201354) by kjnash on 2022-05-30 16:23:42:

    1. closedate changed to: "2459730.18313418"
    2. closer changed to: "kjnash"
    3. login: "kjnash"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"