Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.8, 6.0.0
    • Fix Version/s: 6.2.0, 1.5.9
    • Component/s: wicket
    • Labels:
      None

      Description

      The change introduced in WICKET-4715 causes problems and most probably it should be reverted.

      1. WICKET-4752.patch
        5 kB
        Andrea Del Bene

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        23d 21h 49m 1 Sven Meier 01/Oct/12 07:50
        Hide
        Sven Meier added a comment -

        Just for the record:
        I've tried to delay parsing of the request multiparts until the parameters are accessed.
        But before the form gets a hand on the request (to configure it with maxSize and uploadInfo), the request parameters will already be used by Wicket's request processing, thus already triggering the parsing.

        If you find another solution, we can revisit this issue.

        Show
        Sven Meier added a comment - Just for the record: I've tried to delay parsing of the request multiparts until the parameters are accessed. But before the form gets a hand on the request (to configure it with maxSize and uploadInfo), the request parameters will already be used by Wicket's request processing, thus already triggering the parsing. If you find another solution, we can revisit this issue.
        Sven Meier made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Sven Meier [ svenmeier ]
        Resolution Fixed [ 1 ]
        Hide
        Sven Meier added a comment -

        Reverted Wicket-4715, as this prevented Form to control the multipart file upload. Fixed small error in progressbar.js too.

        Note that Servlet 3.0 makes non-file multipart parameters available via #getParameter() anyway.

        Show
        Sven Meier added a comment - Reverted Wicket-4715, as this prevented Form to control the multipart file upload. Fixed small error in progressbar.js too. Note that Servlet 3.0 makes non-file multipart parameters available via #getParameter() anyway.
        Martijn Dashorst made changes -
        Fix Version/s 6.2.0 [ 12323295 ]
        Martijn Dashorst made changes -
        Fix Version/s 6.1.0 [ 12322957 ]
        Martin Grigorov made changes -
        Fix Version/s 6.1.0 [ 12322957 ]
        Fix Version/s 6.0.1 [ 12322956 ]
        Andrea Del Bene made changes -
        Attachment WICKET-4752.patch [ 12545482 ]
        Hide
        Andrea Del Bene added a comment -

        I've followed your advice making some refactoring and moving the code from constructor to a new method extractPostParameters(). It seems to work, although I didn't coded a use case test yet. However I don't like to check if extractPostParameters has been called in three different methods (getFiles, getFile and generatePostParameters).

        Any better idea?

        Show
        Andrea Del Bene added a comment - I've followed your advice making some refactoring and moving the code from constructor to a new method extractPostParameters(). It seems to work, although I didn't coded a use case test yet. However I don't like to check if extractPostParameters has been called in three different methods (getFiles, getFile and generatePostParameters). Any better idea?
        Hide
        Martin Grigorov added a comment -

        Maybe there is a way to have this feature - MultipartServletWebRequestImpl reads the servlet input stream in its constructor. If this logic is moved to some getXyz() method to make it lazy then I think it will work.

        Show
        Martin Grigorov added a comment - Maybe there is a way to have this feature - MultipartServletWebRequestImpl reads the servlet input stream in its constructor. If this logic is moved to some getXyz() method to make it lazy then I think it will work.
        Hide
        Andrea Del Bene added a comment -

        I've also tried to find a solution but the InputStream of the request can be read only once, hence I also think that WICKET-4715 should be reverted.

        Show
        Andrea Del Bene added a comment - I've also tried to find a solution but the InputStream of the request can be read only once, hence I also think that WICKET-4715 should be reverted.
        Martin Grigorov made changes -
        Field Original Value New Value
        Fix Version/s 6.0.1 [ 12322956 ]
        Fix Version/s 1.5.9 [ 12322962 ]
        Martin Grigorov created issue -

          People

          • Assignee:
            Sven Meier
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development