Re: YAJL

Greg Alston via WEB400 <[email protected]> Tue, 18 Oct 2022 15:20:14 +0000 (UTC)
Newsgroups gmane.comp.systems.as400.web
Message-ID <[email protected]>
 You need to set the content length in your RPGLE program.
The QtmhWrStout API has three parameters - the data, the length of the data, and the error data structure.

If you don't send a length, Apache adds Transfer-encoding: chunked.


    On Tuesday, October 18, 2022 at 11:22:11 AM GMT-3, Brad Stone <[email protected]> wrote:  
 
 Sounds like a question for an Angular group.

On Tue, Oct 18, 2022 at 8:58 AM <[email protected]> wrote:

> It is an Angular program that is currently using Firebase to store its
> data.
> The call to Firebase does not return chunk data, it returns just the JSON
> data.
>
> I am writing an RPGLE/YAJL back end server executed through Apache to
> replace the firebase call.  The plan was to only swap the URL address.  I
> don't really want to have to modify all of the Angular calls to strip the
> extra characters and I have not found a way in Angular to say this is chunk
> data so automatically strip it.
>
> I don't mean to be a jerk with this.  I just don't understand why it DOES
> work one way with Firebase but it DOESN'T work that same way with
> Apache/RPGLE/YAJL.  Is Firebase the one that is wrong and doing something
> non-standard?
>
>
>
> -----Original Message-----
> From: WEB400 <[email protected]> On Behalf Of Brad Stone
> Sent: Tuesday, October 18, 2022 9:07 AM
> To: Web Enabling the IBM i (AS/400 and iSeries) <[email protected]
> >
> Subject: Re: [WEB400] YAJL
>
> Please tell us what you are using to make the request and get the data
> back.
> Did you write some socket application yourself or are you using another
> solution?
>
> Whatever that application is, that's the issue.  It's not processing the
> returned chunked data properly.
>
> On Mon, Oct 17, 2022 at 9:25 PM <[email protected]> wrote:
>
> > The program that is receiving the data is expecting pure JSON data to
> > be returned.  Instead is it receiving these extra bytes prior to the
> > first { and is abending.
> >
> > -----Original Message-----
> > From: WEB400 <[email protected]> On Behalf Of Scott
> > Klement
> > Sent: Monday, October 17, 2022 10:06 PM
> > To: [email protected]
> > Subject: Re: [WEB400] YAJL
> >
> > The "chunked" part is a normal and expected part of the HTTP protocol.
> > Can you explain what problem it is causing you?
> >
> > Since it is part of HTTP, it is being added (correctly) by the IBM
> > HTTP server and is normal and expected.  It won't be in a save-to-file
> > because that doesn't go through the HTTP server.  The data isn't being
> > added by YAJL, it's just part of the HTTP protocol.
> >
> > On 10/17/2022 6:34 PM, [email protected] wrote:
> > > Maybe I'm just being dense here but when I pull data from filebase,
> > > it is not chunked.  Is this a limitation of Apache or YAJL or why
> > > can't I do it with the IBM i?
> > >
> > >
> > --
> > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
> > mailing list To post a message email: [email protected] To
> > subscribe, unsubscribe, or change list options,
> > visit: https://lists.midrange.com/mailman/listinfo/web400
> > or email: [email protected] 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: [email protected] To
> > subscribe, unsubscribe, or change list options,
> > visit: https://lists.midrange.com/mailman/listinfo/web400
> > or email: [email protected] 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: [email protected] To subscribe,
> unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected] 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: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/web400
> or email: [email protected]
> 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: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
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: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: [email protected]
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.