Changeset 2f59a4b


Ignore:
Timestamp:
Jul 21, 2015 12:40:35 AM (5 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
9af197e
Parents:
63e934f
Message:

Fix test

Location:
apps/i2ptunnel/java
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java

    r63e934f r2f59a4b  
    818818     *  @throws IOException on other errors in the underlying stream
    819819     */
    820     private static Map<String, List<String>> readHeaders(I2PSocket socket, InputStream in, StringBuilder command,
     820    static Map<String, List<String>> readHeaders(I2PSocket socket, InputStream in, StringBuilder command,
    821821                                                           String[] skipHeaders, I2PAppContext ctx) throws IOException {
    822822        HashMap<String, List<String>> headers = new HashMap<String, List<String>>();
  • apps/i2ptunnel/java/test/junit/net/i2p/i2ptunnel/I2PTunnelHTTPServerTest.java

    r63e934f r2f59a4b  
    2929                headerString += "\r\n";
    3030                InputStream in = fillInputStream(headerString);
    31                 Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
     31                Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
    3232                assertEquals(headers.size(), 1); //One header
    3333        }
     
    3939                headerString += "\r\n";
    4040                InputStream in = fillInputStream(headerString);
    41                 Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
     41                Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, new StringBuilder(128), new String[0], I2PAppContext.getGlobalContext());
    4242                assertEquals(headers.size(), 1);
    4343                assertEquals(headers.get("someHeader").size(), 2);
     
    5252                InputStream in = fillInputStream(headerString);
    5353                StringBuilder builder = new StringBuilder(128);
    54                 Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(in, builder, new String[0], I2PAppContext.getGlobalContext());
     54                Map<String, List<String>> headers = I2PTunnelHTTPServer.readHeaders(null, in, builder, new String[0], I2PAppContext.getGlobalContext());
    5555                String result = I2PTunnelHTTPServer.formatHeaders(headers, builder);
    5656                int first = result.indexOf("abc");
Note: See TracChangeset for help on using the changeset viewer.