× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I don't know if this answers the question. If not, please tell me what you
need me to post.

This is the line in the RPGLE

yajl_writeStdout(200:yajl_errMsg);

and this is the config file

Display Configuration File
HTTP server: APACHEDFT
Selected file: /www/apachedft/conf/httpd.conf
1 # Apache Default server configuration
2
3 # General setup directives
4 Listen *:80
5 HotBackup Off
6 HostNameLookups Off <- this is strike through
7 UseCanonicalName On <- this is strike through
8 TimeOut 30000
9 KeepAlive Off
10 DocumentRoot /www/apachedft/htdocs
11 AddLanguage en .en
12
13 # Deny most requests for any file
14 <Directory />
15 order allow,deny
16 deny from all
17 Options -Indexes -ExecCGI -includes
18 AllowOverride Limit Options
19 </Directory>
20
21 # Allow requests for files in document root
22 <Directory /www/apachedft/htdocs>
23 order allow,deny
24 allow from all
25 </Directory>
26
27 # The following directives support serving some pages
28 # that are part of a sample database.
29 <Directory /QIBM/ProdData/OS400/SQL/Samples>
30 order allow,deny
31 allow from all
32 </Directory>
33 Alias /QIBM/ProdData/OS400/SQL/Samples
/QIBM/ProdData/OS400/SQL/Samples
34
35 ScriptAlias /httpdata /qsys.lib/$http.lib/httpdata.pgm
36 ScriptAliasMatch /rest/([a-z0-9]*)/.* /qsys.lib/$http.lib/$1.pgm
37
38 <Directory /qsys.lib/$http.lib>
39 SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;QGPL;$HTTP;YAJL;"
40 allow from all
41 order allow,deny
42 Options +ExecCGI +Includes
43 SetOutputFilter Includes
44 </Directory>

-----Original Message-----
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Brad Stone
Sent: Monday, October 17, 2022 6:27 PM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] YAJL

What are you using to send the JSON to the endpoint? That could be
inserting something..

On Mon, Oct 17, 2022 at 5:16 PM <smith5646midrange@xxxxxxxxx> wrote:

I have an RPGLE program creating JSON using YAJL. When I dump the
buffer to the IFS, the data is correct. However, when I return it to
my app or Fiddler (with Fiddler I can look at the raw hex coming
back), it has extra characters before and after the JSON data.



Below is the complete response that I am receiving. Any idea where
the 13e in the middle and the 0 at the end are coming from? These are
not in the buffer when I dump it to the IFS. I am guessing this is
somehow related to a configuration of the HTTP server but since I
don't know what the characters are, I don't know what to look for to
know how to turn them off.







HTTP/1.1 200 OK

Date: Mon, 17 Oct 2022 21:10:11 GMT

Server: Apache

Connection: close

Transfer-Encoding: chunked

Content-Type: application/json; charset=utf-8



13e

{

"sqlString": "select * from $http.custfile",

"results": [

{

"CUSTNO": "1",

"NAME": "Cust 1",

"STREET": "Street 1",

"CITY": "City 1",

"STATE": "ST",

"POSTAL": "12345-6789"

}

],

"status": true,

"message": ""

}



0



--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please
take a moment to review the archives at
https://archive.midrange.com/web400.


--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.