Issue Details (XML | Word | Printable)

Key: STR-2772
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Niall Pemberton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Multipart Command Implementation

Created: 11/Feb/06 02:30 PM   Updated: 08/Mar/08 11:47 PM
Return to search
Component/s: Core
Affects Version/s: 1.3.0
Fix Version/s: 1.4.x

File Attachments:
  Size
Java Source File AbstractMultipartHandler.java 2006-02-11 02:44 PM Niall Pemberton 3 kB
Java Source File CheckIfMultipartRequest.java 2006-02-11 02:37 PM Niall Pemberton 2 kB
Java Source File CreateMultipartHandler.java 2006-02-11 02:39 PM Niall Pemberton 4 kB
Java Source File LookupIgnoreResult.java 2006-02-11 02:51 PM Niall Pemberton 1 kB
Text File struts_multipart_commands.patch 2006-02-11 02:34 PM Niall Pemberton 18 kB
Java Source File StrutsMultipartHandler.java 2006-02-11 02:46 PM Niall Pemberton 3 kB
Java Source File WrapMultipartRequest.java 2006-02-11 02:41 PM Niall Pemberton 1 kB
Environment:
Operating System: other
Platform: Other
Issue Links:
Incorporates
 

Bugzilla Id: 38613


 Description  « Hide
I'm proposing that the multipart processing be separated out into a set of
Commands in a separate chain:

  <!-- ========== Mulitpart Processing chain ========== -->
  <chain name="process-multipart">

      <!-- Check if the request is a multipart request -->
      <command className="o.a.s.c.c.servlet.CheckIfMultipartRequest"/>

      <!-- Create the multipart handler -->
      <command className="o.a.s.c.c.CreateMultipartHandler"/>

      <!-- Wrap the multipart request -->
      <command className="o.a.s.c.c.servlet.WrapMultipartRequest"/>

      <!-- See if the Struts Multipart Handler can process the request -->
      <command className="o.a.s.c.c.servlet.StrutsMultipartHandler"/>

  </chain>

The main "process-action" chain would be modified to use a LookupCommand that
ignores the result of this new "process-multipart" chain. This will allow
multiple multipart handlers to be added to the chain, with the one that
actually handles the request returning "true" to stop processing of
the "process-multipart" chain (but not "process-action" chain).

This proposal has a number of benefits:

1) All mutlipart handling is now in Commands which can easily be configured

2) Removed request "wrapping" code from ComposableRequestProcessor - no need to
sub-class ComposableRequestProcessor to modify the "wrapping".

3) RequestUtils's static populate() method is redundant - all that code is now
in commands - making custom multipart (and form population) processing much
easier.

4) Multiple multipart handlers can be easily configured by simply adding
additional commands to the multipart chain.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Don Brown made changes - 23/Apr/06 04:52 AM
Field Original Value New Value
issue.field.bugzillaimportkey 38613 28063
Paul Benedict made changes - 12/Aug/07 08:58 AM
Fix Version/s 1.4.0 [ 21795 ]
Assignee Struts Developers [ dev@struts.apache.org ]
Issue Type Improvement [ 4 ] New Feature [ 2 ]
Paul Benedict made changes - 22/Aug/07 05:47 AM
Link This issue contains STR-2140 [ STR-2140 ]
Paul Benedict made changes - 08/Mar/08 11:47 PM
Fix Version/s 1.4.x [ 21841 ]
Fix Version/s 1.4.0 [ 21795 ]