Hi People,
I implemented a small request filter to support the Server-Timing header (and web development tools integration). See more here: https://github.com/eMaringolo/seaside-server-timing Note: I think there is a bug in the conversion of the headers from a WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are several headers with the same name in aWAResponse, but only the last one remains in ZnResponse, because it does an `at:put` instead of adding several headers or merging them all together (as with the 'Set-Cookie' header). By doing this I also learned that there is a `Trailer` header, that allows you to add a header that behaves like a footer in a chunked response. This would be useful to track some performance indicators at the very end of the process. But I don't know if this Trailer header is currently supported. Regards! Esteban A. Maringolo _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks, that looks super useful!
Karsten
—
Georg Heeg eK Wallstraße 22 06366 Köthen Tel.: 03496/214328 FAX: 03496/214712 Amtsgericht Dortmund HRA 12812 Am 10. Juli 2020 um 15:49:04, Esteban Maringolo ([hidden email]) schrieb:
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
As somebody else asked by private message, please note that this
just provides the support to performance timings, but it doesn't measure anything internal to Seaside. It is up to the user of the filter to do that. Maybe if this is useful and stable, this can be added to the core of Seaside to track Seaside internal processing, but that would require modifying the core code to signal the appropriate notifications. Regards! Esteban A. Maringolo On Fri, Jul 10, 2020 at 10:55 AM Karsten Kusche <[hidden email]> wrote: > > Thanks, that looks super useful! > > Karsten > > > — > > Georg Heeg eK > > Wallstraße 22 > 06366 Köthen > > Tel.: 03496/214328 > FAX: 03496/214712 > Amtsgericht Dortmund HRA 12812 > > > > Am 10. Juli 2020 um 15:49:04, Esteban Maringolo ([hidden email]) schrieb: > > Hi People, > > I implemented a small request filter to support the Server-Timing > header (and web development tools integration). > > See more here: > https://github.com/eMaringolo/seaside-server-timing > > Note: I think there is a bug in the conversion of the headers from a > WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are > several headers with the same name in aWAResponse, but only the last > one remains in ZnResponse, because it does an `at:put` instead of > adding several headers or merging them all together (as with the > 'Set-Cookie' header). > > By doing this I also learned that there is a `Trailer` header, that > allows you to add a header that behaves like a footer in a chunked > response. This would be useful to track some performance indicators at > the very end of the process. But I don't know if this Trailer header > is currently supported. > > Regards! > > Esteban A. Maringolo > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Esteban A. Maringolo
> On 10 Jul 2020, at 15:48, Esteban Maringolo <[hidden email]> wrote: > > Note: I think there is a bug in the conversion of the headers from a > WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are > several headers with the same name in aWAResponse, but only the last > one remains in ZnResponse, because it does an `at:put` instead of > adding several headers or merging them all together (as with the > 'Set-Cookie' header). Yes, from the first look of it, that seems to be correct. In ZnZincServerAdaptor>>#responseFrom: aRequestContext partialHeaders keysAndValuesDo: [ :key :value | fullHeaders at: key put: value greaseString ]. should be partialHeaders keysAndValuesDo: [ :key :value | fullHeaders at: key add: value greaseString ]. Sven _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Should I create an issue in the Zinc repository then?
Regards! Esteban A. Maringolo On Fri, Jul 10, 2020 at 12:30 PM Sven Van Caekenberghe <[hidden email]> wrote: > > > > > On 10 Jul 2020, at 15:48, Esteban Maringolo <[hidden email]> wrote: > > > > Note: I think there is a bug in the conversion of the headers from a > > WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are > > several headers with the same name in aWAResponse, but only the last > > one remains in ZnResponse, because it does an `at:put` instead of > > adding several headers or merging them all together (as with the > > 'Set-Cookie' header). > > Yes, from the first look of it, that seems to be correct. > > In ZnZincServerAdaptor>>#responseFrom: aRequestContext > > partialHeaders keysAndValuesDo: [ :key :value | > fullHeaders at: key put: value greaseString ]. > > should be > > partialHeaders keysAndValuesDo: [ :key :value | > fullHeaders at: key add: value greaseString ]. > > Sven > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> On 10 Jul 2020, at 17:39, Esteban Maringolo <[hidden email]> wrote: > > Should I create an issue in the Zinc repository then? The adaptor is part of Seaside proper now. So you could create a Seaside issue I guess. > Regards! > > Esteban A. Maringolo > > On Fri, Jul 10, 2020 at 12:30 PM Sven Van Caekenberghe <[hidden email]> wrote: >> >> >> >>> On 10 Jul 2020, at 15:48, Esteban Maringolo <[hidden email]> wrote: >>> >>> Note: I think there is a bug in the conversion of the headers from a >>> WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are >>> several headers with the same name in aWAResponse, but only the last >>> one remains in ZnResponse, because it does an `at:put` instead of >>> adding several headers or merging them all together (as with the >>> 'Set-Cookie' header). >> >> Yes, from the first look of it, that seems to be correct. >> >> In ZnZincServerAdaptor>>#responseFrom: aRequestContext >> >> partialHeaders keysAndValuesDo: [ :key :value | >> fullHeaders at: key put: value greaseString ]. >> >> should be >> >> partialHeaders keysAndValuesDo: [ :key :value | >> fullHeaders at: key add: value greaseString ]. >> >> Sven >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
There it goes a PR then. :-)
Regards! Esteban A. Maringolo On Fri, Jul 10, 2020 at 1:28 PM Sven Van Caekenberghe <[hidden email]> wrote: > > > > > On 10 Jul 2020, at 17:39, Esteban Maringolo <[hidden email]> wrote: > > > > Should I create an issue in the Zinc repository then? > > The adaptor is part of Seaside proper now. So you could create a Seaside issue I guess. > > > Regards! > > > > Esteban A. Maringolo > > > > On Fri, Jul 10, 2020 at 12:30 PM Sven Van Caekenberghe <[hidden email]> wrote: > >> > >> > >> > >>> On 10 Jul 2020, at 15:48, Esteban Maringolo <[hidden email]> wrote: > >>> > >>> Note: I think there is a bug in the conversion of the headers from a > >>> WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are > >>> several headers with the same name in aWAResponse, but only the last > >>> one remains in ZnResponse, because it does an `at:put` instead of > >>> adding several headers or merging them all together (as with the > >>> 'Set-Cookie' header). > >> > >> Yes, from the first look of it, that seems to be correct. > >> > >> In ZnZincServerAdaptor>>#responseFrom: aRequestContext > >> > >> partialHeaders keysAndValuesDo: [ :key :value | > >> fullHeaders at: key put: value greaseString ]. > >> > >> should be > >> > >> partialHeaders keysAndValuesDo: [ :key :value | > >> fullHeaders at: key add: value greaseString ]. > >> > >> Sven > >> _______________________________________________ > >> seaside mailing list > >> [hidden email] > >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thx!
Johan > On 10 Jul 2020, at 19:34, Esteban Maringolo <[hidden email]> wrote: > > There it goes a PR then. :-) > > Regards! > > Esteban A. Maringolo > > On Fri, Jul 10, 2020 at 1:28 PM Sven Van Caekenberghe <[hidden email]> wrote: >> >> >> >>> On 10 Jul 2020, at 17:39, Esteban Maringolo <[hidden email]> wrote: >>> >>> Should I create an issue in the Zinc repository then? >> >> The adaptor is part of Seaside proper now. So you could create a Seaside issue I guess. >> >>> Regards! >>> >>> Esteban A. Maringolo >>> >>> On Fri, Jul 10, 2020 at 12:30 PM Sven Van Caekenberghe <[hidden email]> wrote: >>>> >>>> >>>> >>>>> On 10 Jul 2020, at 15:48, Esteban Maringolo <[hidden email]> wrote: >>>>> >>>>> Note: I think there is a bug in the conversion of the headers from a >>>>> WAResponse to ZnResponse in ZnZincServerAdaptor, since if there are >>>>> several headers with the same name in aWAResponse, but only the last >>>>> one remains in ZnResponse, because it does an `at:put` instead of >>>>> adding several headers or merging them all together (as with the >>>>> 'Set-Cookie' header). >>>> >>>> Yes, from the first look of it, that seems to be correct. >>>> >>>> In ZnZincServerAdaptor>>#responseFrom: aRequestContext >>>> >>>> partialHeaders keysAndValuesDo: [ :key :value | >>>> fullHeaders at: key put: value greaseString ]. >>>> >>>> should be >>>> >>>> partialHeaders keysAndValuesDo: [ :key :value | >>>> fullHeaders at: key add: value greaseString ]. >>>> >>>> Sven >>>> _______________________________________________ >>>> seaside mailing list >>>> [hidden email] >>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >>> _______________________________________________ >>> seaside mailing list >>> [hidden email] >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside >> >> _______________________________________________ >> seaside mailing list >> [hidden email] >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |