<div dir="ltr"><div dir="ltr"><div>Overrides are a door to abuse and sometimes an indicator or a bad design, IMO, but as with other powerful tool, it depends on each case.</div><div><br></div><div>What I don't like the pragma based configuration of this part, the whole senders/implementors and class references of Smalltalk are not of much use there, since it is hard to find where things are defined, configured, etc. </div><div><br></div><div>E.g. SeasideResponder class>>#configureCurrent</div><div><br></div><div>Regards,</div><br clear="all"><div><div dir="ltr" class="gmail_signature">Esteban A. Maringolo</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 2:54 PM Tom Robinson <<a href="mailto:zxrobinson@gmail.com">zxrobinson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    Hi Karsten,<br>
    <br>
    This appears to be a common issue. As such, rather than just using
    an override, maybe Cincom should be asked for an implementation
    change that would ALLOW subclasses to customize this without too
    much code duplication. In my opinion, if an override is needed, in
    most cases it indicates that more flexibility in the original
    implementation is needed.<br>
    <br>
    Tom<br>
    <br>
    <div class="gmail-m_-1827513923480360669moz-cite-prefix">On 5/8/2019 11:30 AM, Karsten Kusche
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">What do you mean by body size limit? Is that a http
        thing?
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">As for subclassing, the method in question isn’t
          written in a way that would allow subclasses to customize
          something without copying too much code. In that case an
          override is better, because there’s tool support to find
          overrides and inspect them upon migration. </div>
        <div dir="ltr"><br>
        </div>
        <div dir="ltr">Karsten</div>
      </div>
      <span id="gmail-m_-1827513923480360669draft-break"></span><br>
      <br>
      <span id="gmail-m_-1827513923480360669draft-break"></span><br>
      <br>
      <div>
        <div class="gmail-m_-1827513923480360669null" dir="auto">Am 8. Mai 2019 um 19:23:15 MESZ
          schrieb Esteban Maringolo <a class="gmail-m_-1827513923480360669moz-txt-link-rfc2396E" href="mailto:emaringolo@gmail.com" target="_blank"><emaringolo@gmail.com></a>:<br class="gmail-m_-1827513923480360669null">
        </div>
        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px" class="gmail-m_-1827513923480360669null">
          <div class="gmail-m_-1827513923480360669null" dir="auto">
            <div class="gmail-m_-1827513923480360669null">
              <div class="gmail-m_-1827513923480360669null">
                <div dir="ltr" class="gmail-m_-1827513923480360669null">
                  <div dir="ltr" class="gmail-m_-1827513923480360669null">
                    <div class="gmail-m_-1827513923480360669null">Hi Karsten,</div>
                    <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                    </div>
                    <div class="gmail-m_-1827513923480360669null">I didn't think about an override
                      and went subclassing directly (I'm not keen/not
                      used to method overrides), but your approach of
                      having a threshold seems like a good tradeoff to
                      preserve the simplicity for small files.</div>
                    <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                    </div>
                    <div class="gmail-m_-1827513923480360669null">What I couldn't find is whether
                      the maximum request body size is enforced with
                      Seaside (I placed a few breakpoints around senders
                      of #requestBodyLimit without any luck).</div>
                    <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                    </div>
                    <div class="gmail-m_-1827513923480360669null">Regards,</div>
                    <br class="gmail-m_-1827513923480360669null" clear="all">
                    <div class="gmail-m_-1827513923480360669null">
                      <div dir="ltr" class="gmail-m_-1827513923480360669null">Esteban A. Maringolo</div>
                    </div>
                    <br class="gmail-m_-1827513923480360669null">
                  </div>
                </div>
                <br class="gmail-m_-1827513923480360669null">
                <div class="gmail-m_-1827513923480360669null">
                  <div dir="ltr" class="gmail-m_-1827513923480360669null">On Wed, May 8, 2019 at
                    1:59 PM Karsten Kusche <<a href="mailto:karsten@heeg.de" class="gmail-m_-1827513923480360669null" target="_blank">karsten@heeg.de</a>>
                    wrote:<br class="gmail-m_-1827513923480360669null">
                  </div>
                  <div class="gmail-m_-1827513923480360669null">
                    <div id="gmail-m_-1827513923480360669bx-quote-21638" class="gmail-m_-1827513923480360669null"><span class="gmail-m_-1827513923480360669null"></span></div>
                  </div>
                  <blockquote type="cite" class="gmail-m_-1827513923480360669null">
                    <div class="gmail-m_-1827513923480360669null">
                      <div class="gmail-m_-1827513923480360669null">
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null">Hi Esteban,</div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                        </div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null">we have an
                          override in
                          SeasideResponder>>asSeasideFileStream:
                          where we do something differently in „stream
                          isExternalStream ifTrue:[…]“</div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                        </div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null">There we ask the
                          stream for #fileName (returns a Filename
                          object) and test the file size. That’s the
                          file that contains the data that was uploaded.
                          If the file’s size exceeds a certain threshold
                          we return a subclass of WAFile that knows the
                          file and not its contents.</div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                        </div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null">Kind Regards</div>
                        <div style="font-family:Helvetica,Arial;font-size:13px" class="gmail-m_-1827513923480360669null">Karsten</div>
                        <br class="gmail-m_-1827513923480360669null">
                        <div class="gmail-m_-1827513923480360669null">
                          <pre style="font-size:14px" class="gmail-m_-1827513923480360669null"><pre class="gmail-m_-1827513923480360669null">Georg Heeg eK

Wallstraße 22

06366 Köthen



Tel.: 03496/214328

FAX: 03496/214712

Amtsgericht Dortmund HRA 12812</pre></pre>
                        </div>
                        <br class="gmail-m_-1827513923480360669null">
                        <p class="gmail-m_-1827513923480360669null">Am 8. Mai 2019 um 16:29:29,
                          Esteban Maringolo (<a href="mailto:emaringolo@gmail.com" class="gmail-m_-1827513923480360669null" target="_blank">emaringolo@gmail.com</a>)
                          schrieb:</p>
                        <blockquote type="cite" class="gmail-m_-1827513923480360669null"><span class="gmail-m_-1827513923480360669null">
                            <div class="gmail-m_-1827513923480360669null">
                              <div class="gmail-m_-1827513923480360669null">
                                <div dir="ltr" class="gmail-m_-1827513923480360669null">I found that
                                  SiouX is effectively uploading the
                                  contents to an attachment file
                                  directory.
                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                  </div>
                                  <div class="gmail-m_-1827513923480360669null">Maybe there is a way
                                    to avoid instantiating a WAFile and
                                    use a WAExternalFile poiting to the
                                    file on disk, or simply using my
                                    custom SeasideResponder subclass.</div>
                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                  </div>
                                  <div class="gmail-m_-1827513923480360669null">This won't save VW
                                    from reading the whole file into
                                    memory before saving it to disk (or
                                    will it?) but it certainly will only
                                    keep the reference during the
                                    request/response of SiouX, which
                                    will be garbage collected faster
                                    than anything on a Seaside
                                    Component.<br class="gmail-m_-1827513923480360669null">
                                  </div>
                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                  </div>
                                  <div class="gmail-m_-1827513923480360669null">Regards,</div>
                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null" clear="all">
                                    <div class="gmail-m_-1827513923480360669null">
                                      <div dir="ltr" class="gmail-m_-1827513923480360669null">Esteban
                                        A. Maringolo</div>
                                    </div>
                                    <br class="gmail-m_-1827513923480360669null">
                                  </div>
                                </div>
                                <br class="gmail-m_-1827513923480360669null">
                                <div class="gmail-m_-1827513923480360669null">
                                  <div dir="ltr" class="gmail-m_-1827513923480360669null">On Wed,
                                    May 8, 2019 at 10:10 AM Esteban
                                    Maringolo <<a href="mailto:emaringolo@gmail.com" class="gmail-m_-1827513923480360669null" target="_blank">emaringolo@gmail.com</a>>
                                    wrote:<br class="gmail-m_-1827513923480360669null">
                                  </div>
                                  <blockquote type="cite" class="gmail-m_-1827513923480360669null">
                                    <div class="gmail-m_-1827513923480360669null">
                                      <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                        <div class="gmail-m_-1827513923480360669null">Hi Felix,</div>
                                        <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                        </div>
                                        <div class="gmail-m_-1827513923480360669null">That is
                                          similar to what Johan proposes
                                          in his article, but the goal
                                          is to achieve the same thing
                                          by using SiouX (VW's latest
                                          HTTP server) responders, maybe
                                          using a chunked read/write
                                          approach (so there is no more
                                          than a certain buffer in the
                                          object memory).</div>
                                        <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                        </div>
                                        <div class="gmail-m_-1827513923480360669null">Regards,</div>
                                        <br class="gmail-m_-1827513923480360669null" clear="all">
                                        <div class="gmail-m_-1827513923480360669null">
                                          <div dir="ltr" class="gmail-m_-1827513923480360669null">Esteban
                                            A. Maringolo</div>
                                        </div>
                                        <br class="gmail-m_-1827513923480360669null">
                                      </div>
                                      <br class="gmail-m_-1827513923480360669null">
                                      <div class="gmail-m_-1827513923480360669null">
                                        <div dir="ltr" class="gmail-m_-1827513923480360669null">On
                                          Wed, May 8, 2019 at 9:46 AM
                                          Félix Madrid <<a href="mailto:fmadrid@gmail.com" class="gmail-m_-1827513923480360669null" target="_blank">fmadrid@gmail.com</a>>
                                          wrote:<br class="gmail-m_-1827513923480360669null">
                                        </div>
                                        <blockquote type="cite" class="gmail-m_-1827513923480360669null">
                                          <div class="gmail-m_-1827513923480360669null">
                                            <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                              <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                                <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                                  <div class="gmail-m_-1827513923480360669null">Hi
                                                    Esteban,</div>
                                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                  <div class="gmail-m_-1827513923480360669null">Maybe
                                                    this article (and
                                                    project) from Nick
                                                    Ager can help you:<br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                  <div class="gmail-m_-1827513923480360669null"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__nickager.com_blog_2011_07_01_File-2Dupload-2Dusing-2DNginx-2Dand-2DSeaside&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=dvjp1HPIw2veDqoXGboS25_BQZgS48rpxicfFO4TU2Q&m=ONky_HujutcG36aWWzrUjY_6ahacPyYsjpo6Eh2OWzE&s=8CLW_694Cyyfynuhkv78YvThaum8a0bjQgvr5Vp6qEA&e=" class="gmail-m_-1827513923480360669null" target="_blank">http://nickager.com/blog/2011/07/01/File-upload-using-Nginx-and-Seaside</a></div>
                                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                  <div class="gmail-m_-1827513923480360669null">Cheers,</div>
                                                  <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                  <div class="gmail-m_-1827513923480360669null">Félix<br class="gmail-m_-1827513923480360669null">
                                                  </div>
                                                </div>
                                              </div>
                                              <br class="gmail-m_-1827513923480360669null">
                                              <div class="gmail-m_-1827513923480360669null">
                                                <div dir="ltr" class="gmail-m_-1827513923480360669null">On Wed,
                                                  May 8, 2019 at 2:39 PM
                                                  Esteban Maringolo <<a href="mailto:emaringolo@gmail.com" class="gmail-m_-1827513923480360669null" target="_blank">emaringolo@gmail.com</a>>
                                                  wrote:<br class="gmail-m_-1827513923480360669null">
                                                </div>
                                                <blockquote type="cite" class="gmail-m_-1827513923480360669null">
                                                  <div class="gmail-m_-1827513923480360669null">
                                                    <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                                      <div dir="ltr" class="gmail-m_-1827513923480360669null">
                                                        <div class="gmail-m_-1827513923480360669null">I'm
                                                          trying to use
                                                          the SiouX
                                                          responder
                                                          fortification
                                                          to limit a
                                                          large file
                                                          upload from
                                                          blocking the
                                                          whole image
                                                          and/or filling
                                                          its memory.</div>
                                                        <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                        </div>
                                                        <div class="gmail-m_-1827513923480360669null">Looking
                                                          at the options
                                                          I found there
                                                          is a "save
                                                          attachments as
                                                          files", which
                                                          seems like a
                                                          similar
                                                          approach as
                                                          the one
                                                          proposed at
                                                          <<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__jbrichau.github.io_blog_large-2Dfile-2Dupload-2Din-2Dseaside&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=dvjp1HPIw2veDqoXGboS25_BQZgS48rpxicfFO4TU2Q&m=ONky_HujutcG36aWWzrUjY_6ahacPyYsjpo6Eh2OWzE&s=62wmHVN59u1Z0_tP2CcYdpULLFAPtfQxL8OupcfF8dA&e=" class="gmail-m_-1827513923480360669null" target="_blank">https://jbrichau.github.io/blog/large-file-upload-in-seaside</a> >
                                                          using NGINX or
                                                          Apache, but
                                                          apparently
                                                          that option
                                                          only works at
NetHttpResponder, but it's not applied in Seaside.<br class="gmail-m_-1827513923480360669null">
                                                        </div>
                                                        <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                        </div>
                                                        <div class="gmail-m_-1827513923480360669null">Did
                                                          anybody
                                                          integrate this
                                                          feature or a
                                                          similar one
                                                          with Seaside
                                                          in VW?
                                                          (otherwise I'd
                                                          have to do it
                                                          myself).</div>
                                                        <div class="gmail-m_-1827513923480360669null"><br class="gmail-m_-1827513923480360669null">
                                                        </div>
                                                        <div class="gmail-m_-1827513923480360669null">Regards!</div>
                                                        <br class="gmail-m_-1827513923480360669null" clear="all">
                                                        <div class="gmail-m_-1827513923480360669null">
                                                          <div dir="ltr" class="gmail-m_-1827513923480360669null">Esteban
                                                          A. Maringolo</div>
                                                        </div>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </blockquote>
                                                <span id="gmail-m_-1827513923480360669bx-quote-end-21638" class="gmail-m_-1827513923480360669null"></span></div>
                                              <br class="gmail-m_-1827513923480360669null">
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                    </div>
                                  </blockquote>
                                </div>
_______________________________________________<br class="gmail-m_-1827513923480360669null">
                                seaside mailing list<br class="gmail-m_-1827513923480360669null">
                                <a href="mailto:seaside@lists.squeakfoundation.org" class="gmail-m_-1827513923480360669null" target="_blank">seaside@lists.squeakfoundation.org</a><br class="gmail-m_-1827513923480360669null">
                                <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.squeakfoundation.org_cgi-2Dbin_mailman_listinfo_seaside&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=dvjp1HPIw2veDqoXGboS25_BQZgS48rpxicfFO4TU2Q&m=ONky_HujutcG36aWWzrUjY_6ahacPyYsjpo6Eh2OWzE&s=nHlYojUD1UOoH_oDklxP36VzZwCUmqixZ28E7uSyI_E&e=" class="gmail-m_-1827513923480360669null" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br class="gmail-m_-1827513923480360669null">
                              </div>
                            </div>
                          </span></blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div>