You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by jo...@mediacombb.net on 2024/06/10 19:59:18 UTC
API Change for TSMimeHdrPrint
Hello,
After a refactor, the first parameter to TSMimeHdrPrint is unused, and we are planning on removing it for ATS 10. The API will be changed as in the following diff:
-void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
+void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
The change is straightforward, but please let me know if you have any questions or concerns.
Thank you,
Josiah VanderZee
Re: API Change for TSMimeHdrPrint
Posted by Brian Neradt <br...@gmail.com>.
+1
"Come to Me, all who are weary and heavy-laden, and I will
give you rest. Take My yoke upon you and learn from Me, for
I am gentle and humble in heart, and you will find rest for
your souls. For My yoke is easy and My burden is light."
~ Matthew 11:28-30
On Mon, Jun 10, 2024 at 3:24 PM Leif Hedstrom <zw...@apache.org> wrote:
> On Mon, Jun 10, 2024 at 13:59 <jo...@mediacombb.net> wrote:
>
> > Hello,
> >
> > After a refactor, the first parameter to TSMimeHdrPrint is unused, and we
> > are planning on removing it for ATS 10. The API will be changed as in the
> > following diff:
> >
> > -void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
> > +void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
>
>
> I think this API is used for debugging purposes, right? So not likely used
> in very many plugins.
>
> If so, +1.
>
> — Leif
>
>
> > The change is straightforward, but please let me know if you have any
> > questions or concerns.
> >
> > Thank you,
> > Josiah VanderZee
> >
> >
> >
> >
>
Re: API Change for TSMimeHdrPrint
Posted by Leif Hedstrom <zw...@apache.org>.
On Mon, Jun 10, 2024 at 13:59 <jo...@mediacombb.net> wrote:
> Hello,
>
> After a refactor, the first parameter to TSMimeHdrPrint is unused, and we
> are planning on removing it for ATS 10. The API will be changed as in the
> following diff:
>
> -void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
> +void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
I think this API is used for debugging purposes, right? So not likely used
in very many plugins.
If so, +1.
— Leif
> The change is straightforward, but please let me know if you have any
> questions or concerns.
>
> Thank you,
> Josiah VanderZee
>
>
>
>
Re: API Change for TSMimeHdrPrint
Posted by Masakazu Kitajo <ma...@apache.org>.
Ok, I didn't think that PR is actually related to the API change. Now the
change makes sense to me. +1
The implementation of the API implementation, mime_hdr_print, requires the
heap parameter for nothing (with ATS_UNUSED comment). So the heap isn't
needed at all in the first place.
On Mon, Jun 10, 2024 at 4:05 PM Brian Neradt <br...@gmail.com> wrote:
> After the refactor in this PR it is no longer needed:
> https://github.com/apache/trafficserver/pull/11432
>
> On Mon, Jun 10, 2024 at 3:53 PM Masakazu Kitajo <ma...@apache.org> wrote:
>
> > It doesn't look like we can remove the first parameter, but I guess I'm
> > missing something.
> >
> > It's currently used in the API implementation like this:
> > HdrHeap *heap = ((HdrHeapSDKHandle *)bufp)->m_heap;
> > and heap is used like this:
> > mime_hdr_print(heap, mh, blk->end(), blk->write_avail(), &bufindex,
> &tmp);
> >
> > Do you mean the code after the refactor gets HdrHeap in another way?
> >
> >
> >
> > On Mon, Jun 10, 2024 at 1:59 PM <jo...@mediacombb.net> wrote:
> >
> > > Hello,
> > >
> > > After a refactor, the first parameter to TSMimeHdrPrint is unused, and
> we
> > > are planning on removing it for ATS 10. The API will be changed as in
> the
> > > following diff:
> > >
> > > -void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
> > > +void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
> > >
> > > The change is straightforward, but please let me know if you have any
> > > questions or concerns.
> > >
> > > Thank you,
> > > Josiah VanderZee
> > >
> > >
> > >
> > >
> >
>
>
> --
> "Come to Me, all who are weary and heavy-laden, and I will
> give you rest. Take My yoke upon you and learn from Me, for
> I am gentle and humble in heart, and you will find rest for
> your souls. For My yoke is easy and My burden is light."
>
> ~ Matthew 11:28-30
>
Re: API Change for TSMimeHdrPrint
Posted by Brian Neradt <br...@gmail.com>.
After the refactor in this PR it is no longer needed:
https://github.com/apache/trafficserver/pull/11432
On Mon, Jun 10, 2024 at 3:53 PM Masakazu Kitajo <ma...@apache.org> wrote:
> It doesn't look like we can remove the first parameter, but I guess I'm
> missing something.
>
> It's currently used in the API implementation like this:
> HdrHeap *heap = ((HdrHeapSDKHandle *)bufp)->m_heap;
> and heap is used like this:
> mime_hdr_print(heap, mh, blk->end(), blk->write_avail(), &bufindex, &tmp);
>
> Do you mean the code after the refactor gets HdrHeap in another way?
>
>
>
> On Mon, Jun 10, 2024 at 1:59 PM <jo...@mediacombb.net> wrote:
>
> > Hello,
> >
> > After a refactor, the first parameter to TSMimeHdrPrint is unused, and we
> > are planning on removing it for ATS 10. The API will be changed as in the
> > following diff:
> >
> > -void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
> > +void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
> >
> > The change is straightforward, but please let me know if you have any
> > questions or concerns.
> >
> > Thank you,
> > Josiah VanderZee
> >
> >
> >
> >
>
--
"Come to Me, all who are weary and heavy-laden, and I will
give you rest. Take My yoke upon you and learn from Me, for
I am gentle and humble in heart, and you will find rest for
your souls. For My yoke is easy and My burden is light."
~ Matthew 11:28-30
Re: API Change for TSMimeHdrPrint
Posted by Masakazu Kitajo <ma...@apache.org>.
It doesn't look like we can remove the first parameter, but I guess I'm
missing something.
It's currently used in the API implementation like this:
HdrHeap *heap = ((HdrHeapSDKHandle *)bufp)->m_heap;
and heap is used like this:
mime_hdr_print(heap, mh, blk->end(), blk->write_avail(), &bufindex, &tmp);
Do you mean the code after the refactor gets HdrHeap in another way?
On Mon, Jun 10, 2024 at 1:59 PM <jo...@mediacombb.net> wrote:
> Hello,
>
> After a refactor, the first parameter to TSMimeHdrPrint is unused, and we
> are planning on removing it for ATS 10. The API will be changed as in the
> following diff:
>
> -void TSMimeHdrPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp);
> +void TSMimeHdrPrint(TSMLoc offset, TSIOBuffer iobufp);
>
> The change is straightforward, but please let me know if you have any
> questions or concerns.
>
> Thank you,
> Josiah VanderZee
>
>
>
>