Changeset 7f472e4e for apps/jetty


Ignore:
Timestamp:
Mar 20, 2015 12:30:04 PM (5 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
590a3c9
Parents:
a3802d4
Message:

Console:

  • Move multipart form support from susimail to jetty-i2p.jar so console can use it
  • Add multipart form support to formhandler.jsi and FormHandler?.java

Reseed:

  • Fix zip magic number
  • Finish manual reseed from local file

package.html files for jetty-i2p.jar

Location:
apps/jetty
Files:
5 added
1 edited
5 moved

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    ra3802d4 r7f472e4e  
    278278        <!-- set if unset -->
    279279        <property name="workspace.changes.tr" value="" />
    280         <!-- old jetty 5 classes blow up the build if you forgot to do distclean -->
    281         <delete dir="build/obj/org" />
    282280        <copy todir="build/obj" file="resources/log4j.properties" />
    283281        <jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
  • apps/jetty/java/src/net/i2p/servlet/RequestWrapper.java

    ra3802d4 r7f472e4e  
    2222 * $Revision: 1.3 $
    2323 */
    24 package i2p.susi.webmail;
     24package net.i2p.servlet;
    2525
    2626import java.io.IOException;
     
    4949 *  The filter would have been added in web.xml,
    5050 *  see that file, where it's commented out.
    51  *
    52  * @author user
     51 *  Filter isn't supported until Tomcat 7 (Servlet 3.0)
     52 *
     53 *  @author user
     54 *  @since 0.9.19 moved from susimail so it may be used by routerconsole too
    5355 */
    54 class RequestWrapper {
     56public class RequestWrapper {
    5557
    5658        private final HttpServletRequest httpRequest;
    57         private MultiPartRequest multiPartRequest;
     59        private final MultiPartRequest multiPartRequest;
    5860        private final Hashtable<String, String> cache;
    5961        private Hashtable<String, Integer> cachedParameterNames;
     
    6668                this.httpRequest = httpRequest;
    6769                String contentType = httpRequest.getContentType();
     70                MultiPartRequest mpr = null;
    6871                if( contentType != null && contentType.toLowerCase(Locale.US).startsWith( "multipart/form-data" ) ) {
    6972                        try {
    70                                 multiPartRequest = new MultiPartRequest( httpRequest );
     73                                mpr = new MultiPartRequest( httpRequest );
    7174                        } catch (IOException e) {
    7275                                // TODO Auto-generated catch block
     
    7477                        }
    7578                }
     79                multiPartRequest = mpr;
    7680        }
    7781
  • apps/jetty/java/src/org/mortbay/servlet/MultiPartRequest.java

    ra3802d4 r7f472e4e  
    264264        // Get first boundary
    265265        String line = _in.readLine();
    266         if (!line.equals(_boundary))
     266        if (line == null || !line.equals(_boundary))
    267267        {
    268268            //log.warn(line);
Note: See TracChangeset for help on using the changeset viewer.