[naviserver-devel] Content-Disposition: form-data - Apparently wrong format

2021-02-24 Thread Iuri de Araujo Sampaio
Hello there, How would I achieve such format for a POST data request, using ns_procs? [24/Feb/2021:14:52:13][30433.7efbf3d70700][-conn:qonteo:default:0:162-] Notice: COENTNT 674349094811372605992454\x0d :Content-Disposition: form-data; name="To"\x0d :\x0d :

Re: [naviserver-devel] What's the replacement of [curl -u] in [ns_http]

2021-02-24 Thread Iuri de Araujo Sampaio
Thanks Gustaf, [join $hash “”] was the solution. It works now! Even though, I still have no idea why that happens. I’m using ns_* procs, simple and straight forward. As in: > % set h [ns_set create] > % ns_set update $h Authorization "Basic [ns_base64encode guest:guest]" > % ns_http

Re: [naviserver-devel] What's the replacement of [curl -u] in [ns_http]

2021-02-23 Thread Iuri de Araujo Sampaio
.99.19 > On Raj. 11, 1442 AH, at 16:08, Iuri de Araujo Sampaio wrote: > > So far, I've found a previous post, from myself :-), regarding quite the same > problem. > > https://www.mail-archive.com/naviserver-devel@lists.sourceforge.net/msg03818.html > > <https

Re: [naviserver-devel] What's the replacement of [curl -u] in [ns_http]

2021-02-22 Thread Iuri de Araujo Sampaio
n step had failure. 22/Feb/2021:16:07:21][1207.7efbb6ffd700][-conn:qonteo:default:2:1647-] Notice: RES2 status 401 time 0:203450 headers d5 body {{"code": 20003, "detail": "", "message": "Authenticate", "more_info": "https://w

[naviserver-devel] What's the replacement of [curl -u] in [ns_http]

2021-02-21 Thread Iuri de Araujo Sampaio
Hello there, I’m trying to rewrite a CURL request to Naviserver. curl 'https://api.twilio.com/2010-04-01/Accounts/ACe13c882f57e87c4b4db37/Messages.json' -X POST \ --data-urlencode 'To=whatsapp:+5511998865465' \ --data-urlencode 'From=whatsapp:+14155238886' \ --data-urlencode 'Body=Your Yummy

Re: [naviserver-devel] ns_conn auth

2020-11-21 Thread Iuri de Araujo Sampaio
There we go! ;) > On Rab. II 6, 1442 AH, at 17:05, Gustaf Neumann wrote: > > Dear Maksym, > > [ns_conn auth] handles Digest authentication (i've never used it), but > "Bearer" is not handled. > The fields in the "Authorization" request header field are not always > structured the same way,

Re: [naviserver-devel] ns_conn auth

2020-11-21 Thread Iuri de Araujo Sampaio
S: Host dev.testdomain.org <http://dev.testdomain.org/> Accept */* > Accept-Encoding {deflate, gzip} Authorization {Bearer } > User-Agent {Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 > Firefox/83.0} X-Real-IP xxx.90.xxx.244 > > ... >

Re: [naviserver-devel] Connect to a web socket in the background

2020-07-14 Thread Iuri de Araujo Sampaio
eumann wrote: > > On 12.07.20 02:14, Iuri de Araujo Sampaio wrote: > >> However, when I run the first version of the code, and it returns an error >> related to: Error: can't set "formMap": variable is array >> >> /usr/local/src/ns-4.9.17/tcl8.6.8/li

Re: [naviserver-devel] Connect to a web socket in the background

2020-07-12 Thread Iuri de Araujo Sampaio
t; invoked from within "ad_try { $handler } ad_script_abort val { # do nothing }" invoked from within "rp_serve_concrete_file [ad_conn file]" > On Dhuʻl-Q. 21, 1441 AH, at 21:14, Iuri de Araujo Sampaio >

Re: [naviserver-devel] Connect to a web socket in the background

2020-07-12 Thread Iuri de Araujo Sampaio
l $code" > invoked from within > "ad_try { > $handler > } ad_script_abort val { > # do nothing > }" > invoked from within > "rp_serve_concrete_file [ad_conn file]" > (procedure "::nsf:

Re: [naviserver-devel] Connect to a web socket in the background

2020-07-12 Thread Iuri de Araujo Sampaio
ad_try { $handler } ad_script_abort val { # do nothing }" invoked from within "rp_serve_concrete_file [ad_conn file]" (procedure "::nsf::procs::rp_serve_abstract_file" line 60) invoked from within "rp_serve_abst

[naviserver-devel] Connect to a web socket in the background

2020-07-11 Thread Iuri de Araujo Sampaio
Hi there, My code's intended to open a websocket connection to the echo service, wait 400ms to ensure that the connection is really established and send a textual message, which should be echoed back by the echo service. The last part will be handling/parsing that message (i.e. TXT or JSON

Re: [naviserver-devel] [ns_getform] doesn't get form-data fields

2020-07-04 Thread Iuri de Araujo Sampaio
erver :) > > In general, it is a good idea to make test-cases with curl, also for you to > understand, what is going on in detail. > > all the best > > -gn > > On 04.07.20 18:37, Iuri de Araujo Sampaio wrote: >> Hi, >> I woke up today and Postman requests w

Re: [naviserver-devel] [ns_getform] doesn't get form-data fields

2020-07-04 Thread Iuri de Araujo Sampaio
. Or it was a cache refreshing delay. Who knows? k ns_log Notice "CTree $cTree " Best wishes, I > On Jul 4, 2020, at 00:25, Iuri de Araujo Sampaio wrote: > > Hello there, > > Reading [ns_getform] documentation, I noticed it supports multipart/form-data > https

[naviserver-devel] [ns_getform] doesn't get form-data fields

2020-07-03 Thread Iuri de Araujo Sampaio
Hello there, Reading [ns_getform] documentation, I noticed it supports multipart/form-data https://naviserver.sourceforge.io/n/naviserver/files/ns_getform.html However, when I run the chunk bellow, it shows no form, neither

Re: [naviserver-devel] Verifying HMAC signature [ns_crypto::hmac ...]

2020-05-26 Thread Iuri de Araujo Sampaio
Thanks Gustaf, Yes, it works fine! I was not capable to understand the verification part. I was trying to learn it by repeating the method of base64* with encode/decode. Then, after decrypting, to verify if secret and data were both the same from the original request Best wishes, I On May

Re: [naviserver-devel] What to do when [ns_base64encode] doesn't encrypt properly after the 63rd char?

2020-05-25 Thread Iuri de Araujo Sampaio
<http://iurix.com/REST>', > 'sub': '704', 'iat': 1590365650} > > > On Sun, May 24, 2020 at 11:56 PM Maksym Zinchenko <mailto:siqsu...@gmail.com>> wrote: > sourcecode/nsd/uuencode.c maybe > > On Sun, May 24, 2020 at 11:23 PM Iuri de Araujo Sampaio <mai

Re: [naviserver-devel] Registering/Allowing request method HTTP PUT

2020-05-25 Thread Iuri de Araujo Sampaio
Right on! Thanks Gustaf! The error was in the registration call. I had assigned the virtual OACS url as the path to the file, instead of the physical path. As you brightly described in > ns_register_tcl PUT /REST2/ /usr/local/oacs-5-10/openacs-4/www/ and regarding “unfriendly” behavior >

[naviserver-devel] What to do when [ns_base64encode] doesn't encrypt properly after the 63rd char?

2020-05-24 Thread Iuri de Araujo Sampaio
Hi there, It looks like [ns_base64encode] generates a wrong payload when message size contains more than 63 characters. https://tools.ietf.org/html/rfc4648#section-5 An alternative alphabet has been suggested that would use "~" as the 63rd

Re: [naviserver-devel] Registering/Allowing request method HTTP PUT

2020-05-24 Thread Iuri de Araujo Sampaio
um. > > On Sun, May 24, 2020 at 9:00 PM Iuri de Araujo Sampaio <mailto:i...@iurix.com>> wrote: > Hello there! > Thanks Maksym, it’s always good to double check fundamentals. > > I’ve followed standard’s installation, using install-ns.sh script, available > on

Re: [naviserver-devel] Registering/Allowing request method HTTP PUT

2020-05-24 Thread Iuri de Araujo Sampaio
Hello there! Thanks Maksym, it’s always good to double check fundamentals. I’ve followed standard’s installation, using install-ns.sh script, available on GitHub. https://github.com/gustafn/install-ns/ Plus, http-handlers-init.tcl loads properly