• Re: ::http::geturl long string issue

    From Harald Oehlmann@21:1/5 to All on Tue Aug 23 14:27:36 2022
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance




    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Tue Aug 23 05:15:49 2022
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Tue Aug 23 15:42:20 2022
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!! >>>
    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance


    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark"
    -query $http_str_after_question_mark

    Hope this helps,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Tue Aug 23 06:15:27 2022
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerald Lester@21:1/5 to rola...@gmail.com on Tue Aug 23 08:38:19 2022
    On 8/23/22 07:15, rola...@gmail.com wrote:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance

    As the message says, the error is coming from the server. Whatever you
    have in the $http_str is making the url too long for it to handle (and
    likely not valid).

    Also I would strongly suggest you use the uri::join to build up the
    actual URL and not just substitute in stuff.


    --
    +----------------------------------------------------------------------+
    | Gerald W. Lester, President, KNG Consulting LLC |
    | Email: Gerald.Lester@kng-consulting.net | +----------------------------------------------------------------------+

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Tue Aug 23 12:55:25 2022
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" -query $http_str_after_question_mark

    Hope this helps,
    Harald

    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Tue Aug 23 12:51:56 2022
    Gerald Lester 在 2022年8月24日 星期三凌晨1:38:29 [UTC+12] 的信中寫道:
    On 8/23/22 07:15, rola...@gmail.com wrote:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance
    As the message says, the error is coming from the server. Whatever you
    have in the $http_str is making the url too long for it to handle (and likely not valid).

    Also I would strongly suggest you use the uri::join to build up the
    actual URL and not just substitute in stuff.


    --
    +----------------------------------------------------------------------+
    | Gerald W. Lester, President, KNG Consulting LLC |
    | Email: Gerald...@kng-consulting.net | +----------------------------------------------------------------------+

    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    will try uri::join later

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Wed Aug 24 02:32:07 2022
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument. The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Wed Aug 24 03:58:52 2022
    Siri Cruise 在 2022年8月24日 星期三晚上10:48:23 [UTC+12] 的信中寫道:
    In article
    <5f2d7e8c-21cd-4433...@googlegroups.com>,
    "rola...@gmail.com" <rola...@gmail.com> wrote:

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?
    This won't be as easy as ::http, but you can telnet to port 80
    and type the http request by hand (copy/paste from a text
    edittor). That can let you varying the request while seeing
    exactly how the host responds until you come up with a truncated
    request format that works.

    --
    :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
    'I desire mercy, not sacrifice.' /|¥
    Discordia: not just a religion but also a parody. This post / ¥
    I am an Andrea Chen sockpuppet. insults Islam. Mohammed

    hi Siri

    thanks for your advice , will try telnet to verify

    update model 2. it can be implement , but the program handling no respone ...
    the real request already send to server , and accepted , may not get feedback let my program stop as normal ...

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Siri Cruise@21:1/5 to rola...@gmail.com on Wed Aug 24 03:48:05 2022
    In article
    <5f2d7e8c-21cd-4433-8224-fdc805a30693n@googlegroups.com>,
    "rola...@gmail.com" <rolance1@gmail.com> wrote:

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    This won't be as easy as ::http, but you can telnet to port 80
    and type the http request by hand (copy/paste from a text
    edittor). That can let you varying the request while seeing
    exactly how the host responds until you come up with a truncated
    request format that works.

    --
    :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
    'I desire mercy, not sacrifice.' /|¥ Discordia: not just a religion but also a parody. This post / ¥
    I am an Andrea Chen sockpuppet. insults Islam. Mohammed

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to rola...@gmail.com on Wed Aug 24 13:47:07 2022
    rola...@gmail.com <rolance1@gmail.com> wrote:
    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    Normally, url length limits are enforced *by the server*. Therefore
    there is nothing you can do client side to pass a URL longer than the
    server allows.

    Your best course of action would be to modify/reconfigure the server to
    accept a longer URL.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Siri Cruise@21:1/5 to Rich on Wed Aug 24 06:54:59 2022
    In article <te5a4q$3b22t$1@dont-email.me>,
    Rich <rich@example.invalid> wrote:

    Your best course of action would be to modify/reconfigure the server to accept a longer URL.

    If you're controlling the client side and server side, you can
    use the vague notion of an HTTP session, especially with PHP, to
    implement a single request into a session of related requests.

    --
    :-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
    'I desire mercy, not sacrifice.' /|\ Discordia: not just a religion but also a parody. This post / \
    I am an Andrea Chen sockpuppet. insults Islam. Mohammed

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Wed Aug 24 16:36:12 2022
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument. >>> The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark"
    -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance


    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers
    [list Authorization "Bearer -------"]]

    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Wed Aug 24 13:10:25 2022
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you >>>>> should use a post request. See the -query option of http for help. >>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument. >>> The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" >>> -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers
    [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to rola...@gmail.com on Wed Aug 24 21:32:48 2022
    rola...@gmail.com <rolance1@gmail.com> wrote:
    set http_str [::http::formatQuery trn_no AV220823028 \
    filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual ....
    success to pass long string ...

    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    You show how you generate the http_str variable -- but your geturl
    example uses a http_str1 variable. If you really have two variables,
    then how did you create the contents of http_str1?

    Assuming you meant $http_str above, then this is correctly formatted,
    you generate a proper query string with formatQuery, and then pass it
    as the parameter to -query (which, per the docs, will cause a POST
    call).

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query "trn_no AV220823028 $http_str1" \
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    Under the assumption you meant "http_str" in the above geturl call,
    then the reason why this fails is you are passing an invalid query
    string to -query. The string you hand -query above is not properly URL
    encoded if this is meant to emulate POSTing of HTML forms data.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Wed Aug 24 17:25:25 2022
    Rich 在 2022年8月25日 星期四上午9:32:52 [UTC+12] 的信中寫道:
    rola...@gmail.com <rola...@gmail.com> wrote:
    set http_str [::http::formatQuery trn_no AV220823028 \
    filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual ....
    success to pass long string ...

    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]
    You show how you generate the http_str variable -- but your geturl
    example uses a http_str1 variable. If you really have two variables,
    then how did you create the contents of http_str1?

    Assuming you meant $http_str above, then this is correctly formatted,
    you generate a proper query string with formatQuery, and then pass it
    as the parameter to -query (which, per the docs, will cause a POST
    call).
    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query "trn_no AV220823028 $http_str1" \
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]
    Under the assumption you meant "http_str" in the above geturl call,
    then the reason why this fails is you are passing an invalid query
    string to -query. The string you hand -query above is not properly URL encoded if this is meant to emulate POSTing of HTML forms data.
    hi Rich
    Thanks for your advice, original is http_str1. Miss 1 sorry.
    Do you have any ideal for handling issue,already send correct format, and success send data..
    How can make program stop normal ,any further parameter?

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to rola...@gmail.com on Thu Aug 25 01:58:27 2022
    rola...@gmail.com <rolance1@gmail.com> wrote:
    Rich ? 2022?8?25? ?????9:32:52 [UTC+12] ??????
    rola...@gmail.com <rola...@gmail.com> wrote:
    set http_str [::http::formatQuery trn_no AV220823028 \
    filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual ....
    success to pass long string ...

    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]
    You show how you generate the http_str variable -- but your geturl
    example uses a http_str1 variable. If you really have two variables,
    then how did you create the contents of http_str1?

    Assuming you meant $http_str above, then this is correctly formatted,
    you generate a proper query string with formatQuery, and then pass it
    as the parameter to -query (which, per the docs, will cause a POST
    call).
    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query "trn_no AV220823028 $http_str1" \
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]
    Under the assumption you meant "http_str" in the above geturl call,
    then the reason why this fails is you are passing an invalid query
    string to -query. The string you hand -query above is not properly URL
    encoded if this is meant to emulate POSTing of HTML forms data.
    hi Rich
    Thanks for your advice, original is http_str1. Miss 1 sorry.

    It is often better to copy/paste tested code into your postings here,
    otherwise the advice you get can often be directed at the wrong issue.

    Do you have any ideal for handling issue,already send correct format,
    and success send data..

    You say #1 works, so what issue are you having?

    How can make program stop normal ,any further parameter?

    I do not understand your question. If you want your program to stop,
    then execute an "exit" command and it will stop.

    If this is not what you want, then you need to be more detailed in your description of what you do want, because when you say "program stop" I
    read that as synonymous with "exit".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Wed Aug 24 22:53:43 2022
    Rich 在 2022年8月25日 星期四下午1:58:31 [UTC+12] 的信中寫道:
    rola...@gmail.com <rola...@gmail.com> wrote:
    Rich ? 2022?8?25? ?????9:32:52 [UTC+12] ??????
    rola...@gmail.com <rola...@gmail.com> wrote:
    set http_str [::http::formatQuery trn_no AV220823028 \
    filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual ....
    success to pass long string ...

    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] >> You show how you generate the http_str variable -- but your geturl
    example uses a http_str1 variable. If you really have two variables,
    then how did you create the contents of http_str1?

    Assuming you meant $http_str above, then this is correctly formatted,
    you generate a proper query string with formatQuery, and then pass it
    as the parameter to -query (which, per the docs, will cause a POST
    call).
    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" \
    -query "trn_no AV220823028 $http_str1" \
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]
    Under the assumption you meant "http_str" in the above geturl call,
    then the reason why this fails is you are passing an invalid query
    string to -query. The string you hand -query above is not properly URL
    encoded if this is meant to emulate POSTing of HTML forms data.
    hi Rich
    Thanks for your advice, original is http_str1. Miss 1 sorry.
    It is often better to copy/paste tested code into your postings here, otherwise the advice you get can often be directed at the wrong issue.
    Do you have any ideal for handling issue,already send correct format,
    and success send data..
    You say #1 works, so what issue are you having?
    How can make program stop normal ,any further parameter?
    I do not understand your question. If you want your program to stop,
    then execute an "exit" command and it will stop.

    If this is not what you want, then you need to be more detailed in your description of what you do want, because when you say "program stop" I
    read that as synonymous with "exit".
    hi Rich
    thanks for your advice ,
    the real problem is normally send a request or command to server , it will feedback like status code 200, the program will ready for next command.
    not already occupy my program's channel .... ,and program handing ....
    or do you have synonymous way to solve this issue use ::http::geturl relate command or parameter ...

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Aug 25 10:07:06 2022
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you >>>>>>> should use a post request. See the -query option of http for help. >>>>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument. >>>>> The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" >>>>> -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers
    [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance

    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and
    set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send
    the php code which works for you ?

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Thu Aug 25 02:02:59 2022
    Harald Oehlmann 在 2022年8月25日 星期四晚上8:07:09 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you >>>>>>> should use a post request. See the -query option of http for help. >>>>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" >>>>> -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers
    [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance
    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and
    set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send
    the php code which works for you ?

    Take care,
    Harald
    Hi Harald

    Great thanks for your code , will try and report the result later
    for the php code is very simple ... because the api server develop by php , and send long string just like json type ...
    data string example :
    data_string:
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Aug 25 11:17:23 2022
    Am 25.08.2022 um 11:02 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上8:07:09 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue


    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you >>>>>>>>> should use a post request. See the -query option of http for help. >>>>>>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark" >>>>>>> -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way.
    will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers
    [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance
    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and
    set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send
    the php code which works for you ?

    Take care,
    Harald
    Hi Harald

    Great thanks for your code , will try and report the result later
    for the php code is very simple ... because the api server develop by php , and send long string just like json type ...
    data string example :
    data_string:
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    BR
    Rolance

    Hi Rolance,

    thank you for the PHP code. I suppose, it is incomplete, as the authentification is missing.

    IMHO, you may do the same in TCL. Here is an untested sketch.

    set data_string "
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"

    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string
    headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    I added the mime-type for json.

    Hope this helps,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Thu Aug 25 13:10:30 2022
    Am 25.08.2022 um 12:41 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上9:17:27 [UTC+12] 的信中寫道:
    Am 25.08.2022 um 11:02 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上8:07:09 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue >>>>>>>>>>>>

    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you >>>>>>>>>>> should use a post request. See the -query option of http for help. >>>>>>>>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work . >>>>>>>>>>
    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark"
    -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way. >>>>>>>> will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers >>>>>> [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance
    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and >>>> set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send >>>> the php code which works for you ?

    Take care,
    Harald
    Hi Harald

    Great thanks for your code , will try and report the result later
    for the php code is very simple ... because the api server develop by php , and send long string just like json type ...
    data string example :
    data_string:
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    BR
    Rolance
    Hi Rolance,

    thank you for the PHP code. I suppose, it is incomplete, as the
    authentification is missing.

    IMHO, you may do the same in TCL. Here is an untested sketch.

    set data_string "
    {
    "filename": "x2.png",
    "file":
    "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string
    headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    I added the mime-type for json.

    Hope this helps,
    Harald

    Hi harald

    great thanks for your code , the test result as below.

    1.set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    not work , the server will receive BASE64 string to it's database
    -timeout no affect

    2.
    set data_string "
    {
    "filename": "x2.png",
    "file":
    "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string
    headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    work in small size picture , less string
    if the string as 1-2MB still hanging ... timeout no affect ...


    as now , below code is the best way to work , but the hanging issue still not solved by add timeout ....
    it's seem occupy the socket , no signal to let program already finish ... set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxx"]]

    do you have any ideal to conquer this , may by another way ..

    BR
    Rolance



    In your php example, you used the 3rd party tool curt to send the data.
    The same tool is also available with TCL. It is called "tclcurl".
    This may help you. It may use advanced features not implemented in httpget.

    For the reason for the hang, I have no idea or experience.
    Sending big files by post is always critical and the base64 encodation
    makes it worse, due to its overhead (+3/2).
    AFAIK, there is a hard limit of 1MB * 2 / 3. But it should really not hang.
    A hang normally happens due to a not responding web server.
    So, a timeout is necessary to avoid this.
    A typical time is 2 Minuites, so 2*60*1000 = 180000. A "-timeout 180000"
    would be reasonable.

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Thu Aug 25 03:41:33 2022
    Harald Oehlmann 在 2022年8月25日 星期四晚上9:17:27 [UTC+12] 的信中寫道:
    Am 25.08.2022 um 11:02 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上8:07:09 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue >>>>>>>>>>

    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help. >>>>>>>>>
    Harald

    hi Harald

    thanks for your advice , already try post still not work .

    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code...
    But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark"
    -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way. >>>>>> will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers >>>> [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance
    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and >> set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send
    the php code which works for you ?

    Take care,
    Harald
    Hi Harald

    Great thanks for your code , will try and report the result later
    for the php code is very simple ... because the api server develop by php , and send long string just like json type ...
    data string example :
    data_string:
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    BR
    Rolance
    Hi Rolance,

    thank you for the PHP code. I suppose, it is incomplete, as the authentification is missing.

    IMHO, you may do the same in TCL. Here is an untested sketch.

    set data_string "
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    I added the mime-type for json.

    Hope this helps,
    Harald

    Hi harald

    great thanks for your code , the test result as below.

    1.set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    not work , the server will receive BASE64 string to it's database
    -timeout no affect

    2.
    set data_string "
    {
    "filename": "x2.png",
    "file":
    "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string
    headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    work in small size picture , less string
    if the string as 1-2MB still hanging ... timeout no affect ...


    as now , below code is the best way to work , but the hanging issue still not solved by add timeout ....
    it's seem occupy the socket , no signal to let program already finish ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxx"]]

    do you have any ideal to conquer this , may by another way ..

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Thu Aug 25 05:22:12 2022
    Harald Oehlmann 在 2022年8月25日 星期四晚上11:10:34 [UTC+12] 的信中寫道:
    Am 25.08.2022 um 12:41 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上9:17:27 [UTC+12] 的信中寫道:
    Am 25.08.2022 um 11:02 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四晚上8:07:09 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 22:10 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月25日 星期四凌晨2:36:15 [UTC+12] 的信中寫道:
    Am 24.08.2022 um 11:32 schrieb rola...@gmail.com:
    rola...@gmail.com 在 2022年8月24日 星期三清晨7:55:27 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨1:42:23 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 15:15 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月24日 星期三凌晨12:27:39 [UTC+12] 的信中寫道:
    Am 23.08.2022 um 14:15 schrieb rola...@gmail.com:
    Hi everyone

    do someone give an direction to conquer long string issue >>>>>>>>>>>>

    below will implement in less string ---> $http_str

    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers [list Authorization "Bearer -------"]]

    when I send mass data as string in $http_str

    the server feedback :

    The requested URL'S length exceeds the capacity limit for this server !!!

    BR
    Rolance



    There is a limit of 1024 characters on get requests. Otherwise, you
    should use a post request. See the -query option of http for help.

    Harald

    hi Harald

    thanks for your advice , already try post still not work . >>>>>>>>>>
    do you have woring code for this ? I need send mass data to server , PHP work fine , but I want use tcl to do this action.

    Rolance

    Working code ;-) ? That depends on your server.

    If you have PHP code working, you may post your PHP code... >>>>>>>>> But first show, what is in your variable $http_str

    You should take the variable part (after the "?") as the query argument.
    The "?" should be removed.

    ::http::geturl "http://xxx.xxx.xxx/api/$http_str_before_question_mark"
    -query $http_str_after_question_mark

    Hope this helps,
    Harald
    thanks for your advice
    yes it server problem , some server will pass all my sending mass string to API .
    use php need to call thrid party software , process not fast way. >>>>>>>> will try your suggestion later

    BR
    Rolance

    Hi all
    after try two upper two advice
    1. uri::join not work ...
    2. seem have some affect , but miss first parameter

    do someone have any ideal for post mass string to server use ::http::geturl or some better extension?

    BR
    Rolance

    Dear Rolance,

    thank you for the answer.

    Your example was:
    set tok [::http::geturl "http://xxx.xxx.xxx/api/$http_str" -headers >>>>>> [list Authorization "Bearer -------"]]
    Could you give an example for the content of $http_str ?

    Is the server public, so we could try it on our own ?

    Take care,
    Harald
    Hi Harald

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    set http_str [::http::formatQuery trn_no AV220823028 filename tt3.gif file [::http::quoteString $data]]

    1. work , but program nenver stop , need stop by manual .... success to pass long string ...
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    2. not work , reply success 200 , but file not upload ....
    set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query "trn_no AV220823028 $http_str1" -headers [list Authorization "Bearer 3|xxxxxxxxxxx"]

    the server not public , sorry ...

    is another way , let me program timout it'self .... to conquer handing issue.


    BR
    Rolance
    Hi Rolance,

    so, you try to send a file contents.
    it might be an idea to send the file data verbatim (not url encoded) and
    set the mime type to the propper file type.
    set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    You wrote in your initial post, that it works with php. Could you send >>>> the php code which works for you ?

    Take care,
    Harald
    Hi Harald

    Great thanks for your code , will try and report the result later
    for the php code is very simple ... because the api server develop by php , and send long string just like json type ...
    data string example :
    data_string:
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    BR
    Rolance
    Hi Rolance,

    thank you for the PHP code. I suppose, it is incomplete, as the
    authentification is missing.

    IMHO, you may do the same in TCL. Here is an untested sketch.

    set data_string "
    {
    "filename": "x2.png",
    "file":
    "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string
    headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000
    -type application/json

    I added the mime-type for json.

    Hope this helps,
    Harald

    Hi harald

    great thanks for your code , the test result as below.

    1.set h [open tt3.gif rb]
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -method post
    -headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -channel $h
    -timeout 10000000 -type image/gif]

    not work , the server will receive BASE64 string to it's database
    -timeout no affect

    2.
    set data_string "
    {
    "filename": "x2.png",
    "file": "iVBORw0KGgoAAAANSUhEUgAAAOAAAADhCAMAAADmr0l2AAAAh1BMVEX///8AAADu7u7t7e3z8/P6+vrs7Oz29vb7+"
    }"
    http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $data_string headers [list Authorization "Bearer 3|xxxxxxxxxxx"] -timeout 10000000 -type application/json

    work in small size picture , less string
    if the string as 1-2MB still hanging ... timeout no affect ...


    as now , below code is the best way to work , but the hanging issue still not solved by add timeout ....
    it's seem occupy the socket , no signal to let program already finish ... set tok1 [::http::geturl "http://xxx.xxx.xxx.xxx/api/invofile" -query $http_str1 -headers [list Authorization "Bearer 3|xxxxxxxxx"]]

    do you have any ideal to conquer this , may by another way ..

    BR
    Rolance


    In your php example, you used the 3rd party tool curt to send the data.
    The same tool is also available with TCL. It is called "tclcurl".
    This may help you. It may use advanced features not implemented in httpget.

    For the reason for the hang, I have no idea or experience.
    Sending big files by post is always critical and the base64 encodation
    makes it worse, due to its overhead (+3/2).
    AFAIK, there is a hard limit of 1MB * 2 / 3. But it should really not hang. A hang normally happens due to a not responding web server.
    So, a timeout is necessary to avoid this.
    A typical time is 2 Minuites, so 2*60*1000 = 180000. A "-timeout 180000" would be reasonable.

    Take care,
    Harald

    Hi Harald

    thanks for your advice and great support , will try your suggestion .

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@gmail.com@21:1/5 to rola...@gmail.com on Thu Aug 25 12:16:51 2022
    On 8/24/22 4:10 PM, rola...@gmail.com wrote:

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)



    Just to add the plethora of suggestions:

    I wonder if your issue is on your local side where you convert the
    program/file to base64. Have you checked for characters that might break continuity like trailing trailing newlines, character sequences that
    might be special to the server, etc.? Do you have a sense of what types
    of "data" makes it stop working ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@gmail.com@21:1/5 to rola...@gmail.com on Thu Aug 25 16:11:26 2022
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    do you have any ideal for break the connection after may several time (timout not affact)

    BR
    Rolance


    Hello,

    A few suggestions:

    1) See if the errors you get are always for gif data or commands, as you describe it. If one or the other (and not mixed), then that is where
    your error comes from.

    2) Make sure the data you send is the same as what the server receives.
    If you have any control over the server, you can just put a few print statements in there to check. If not, you can put up a simple server
    and do the same. You can find sample code for several such servers on
    the wiki.

    3) You can put your geturl part of the code in a thread in your (client) program. Set up an after control to your timeout seconds, and just
    destroy the thread when it fires.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Thu Aug 25 12:57:21 2022
    saito...@gmail.com 在 2022年8月26日 星期五凌晨4:17:01 [UTC+12] 的信中寫道:
    On 8/24/22 4:10 PM, rola...@gmail.com wrote:

    thanks your example , to conquer long string issue. need to do further try handling issue

    the content is

    data is mass command or file (tranfer to base64 string)


    Just to add the plethora of suggestions:

    I wonder if your issue is on your local side where you convert the program/file to base64. Have you checked for characters that might break continuity like trailing trailing newlines, character sequences that
    might be special to the server, etc.? Do you have a sense of what types
    of "data" makes it stop working ?

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    do you have any ideal for break the connection after may several time (timout not affact)

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@gmail.com@21:1/5 to saitology9@gmail.com on Thu Aug 25 16:15:17 2022
    On 8/25/22 4:11 PM, saitology9@gmail.com wrote:

    Hello,

    A few suggestions:


    One more:

    4) Check your Bearer authorization. Can you switch to Basic and see if
    it works?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@gmail.com@21:1/5 to rola...@gmail.com on Thu Aug 25 16:29:16 2022
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.



    Just to clarify: [::http::quoteString $data] is not going to clean up
    your data if it contains character sequences that trip up your server.
    It does not even remove extra spaces. It just converts $data into html
    that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]
    space

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Thu Aug 25 18:18:44 2022
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up
    your data if it contains character sequences that trip up your server.
    It does not even remove extra spaces. It just converts $data into html
    that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Fri Aug 26 08:41:07 2022
    Am 26.08.2022 um 03:18 schrieb rola...@gmail.com:
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up
    your data if it contains character sequences that trip up your server.
    It does not even remove extra spaces. It just converts $data into html
    that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance

    Which ERP system ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Fri Aug 26 02:03:07 2022
    Harald Oehlmann 在 2022年8月26日 星期五下午6:41:09 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 03:18 schrieb rola...@gmail.com:
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up
    your data if it contains character sequences that trip up your server.
    It does not even remove extra spaces. It just converts $data into html
    that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance
    Which ERP system ?
    Hi Harald
    it normal company system , include sale , finance, product ,order, supply chian...
    develop automation for user and auto data collection
    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Harald Oehlmann@21:1/5 to All on Fri Aug 26 11:32:41 2022
    Am 26.08.2022 um 11:03 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月26日 星期五下午6:41:09 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 03:18 schrieb rola...@gmail.com:
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up
    your data if it contains character sequences that trip up your server. >>>> It does not even remove extra spaces. It just converts $data into html >>>> that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance
    Which ERP system ?
    Hi Harald
    it normal company system , include sale , finance, product ,order, supply chian...
    develop automation for user and auto data collection
    BR
    Rolance

    Rolance,
    thank you. May daily business is to connect to SAP, MS Dynamics etc. So,
    if it would be one of those, I may have helped you.

    Take care,
    Harald

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Fri Aug 26 03:48:11 2022
    rola...@gmail.com 在 2022年8月26日 星期五晚上10:41:39 [UTC+12] 的信中寫道:
    Harald Oehlmann 在 2022年8月26日 星期五晚上9:32:45 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 11:03 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月26日 星期五下午6:41:09 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 03:18 schrieb rola...@gmail.com:
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up >>>> your data if it contains character sequences that trip up your server.
    It does not even remove extra spaces. It just converts $data into html
    that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance
    Which ERP system ?
    Hi Harald
    it normal company system , include sale , finance, product ,order, supply chian...
    develop automation for user and auto data collection
    BR
    Rolance
    Rolance,
    thank you. May daily business is to connect to SAP, MS Dynamics etc. So, if it would be one of those, I may have helped you.

    Take care,
    Harald
    Hi Harald
    thanks for your support , it's a highly customize system , each function for some purpose.
    BR
    Rolance
    Hi saito

    already test for base64 string , remove any special char , the hanging problem still exist....
    will try another command or parameter to achieve ....
    if no solution before system online , will use plan B ---> thread

    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rolance1@gmail.com@21:1/5 to All on Fri Aug 26 03:41:37 2022
    Harald Oehlmann 在 2022年8月26日 星期五晚上9:32:45 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 11:03 schrieb rola...@gmail.com:
    Harald Oehlmann 在 2022年8月26日 星期五下午6:41:09 [UTC+12] 的信中寫道:
    Am 26.08.2022 um 03:18 schrieb rola...@gmail.com:
    saito...@gmail.com 在 2022年8月26日 星期五上午8:29:22 [UTC+12] 的信中寫道:
    On 8/25/22 3:57 PM, rola...@gmail.com wrote:

    Hi saito

    thanks for your advice ,
    already use the way [::http::quoteString $data] to tranfer trailing newlines issue , not affect ,
    try binary ture , no affedct ... try join all string (remove \n) , no affect..
    since the data already success send to server , and display normal , hanging issue is now need to be solve.

    Just to clarify: [::http::quoteString $data] is not going to clean up >>>> your data if it contains character sequences that trip up your server. >>>> It does not even remove extra spaces. It just converts $data into html >>>> that is usable in a url.

    For example,

    % ::http::quoteString " space "
    %20space%20
    % ::http::quoteString [string trim " space "]

    Hi saito

    Great thanks for your advice, will try later and report the result

    The server is our ERP system,I can verify. The data if correct,

    Will try compare base64 string if any special char inside.
    If still not solved ,will try thread

    BR
    Rolance
    Which ERP system ?
    Hi Harald
    it normal company system , include sale , finance, product ,order, supply chian...
    develop automation for user and auto data collection
    BR
    Rolance
    Rolance,
    thank you. May daily business is to connect to SAP, MS Dynamics etc. So,
    if it would be one of those, I may have helped you.

    Take care,
    Harald
    Hi Harald
    thanks for your support , it's a highly customize system , each function for some purpose.
    BR
    Rolance

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)