Sha256: 7f1e47946348c0e3c7ccc3f7bf846bc8659a9382c323e079d6ad17d8cc545c1e

Contents?: true

Size: 1.33 KB

Versions: 21

Compression:

Stored size: 1.33 KB

Contents

package http_parser.lolevel;

import java.nio.*;
import java.util.*;

import static http_parser.lolevel.Util.*;
import http_parser.*;

import primitive.collection.ByteList;

public class Responses {

  

  public static void test () {
    p(Responses.class);
    List<Message> all = TestLoaderNG.load("tests.dumped");
    List<Message> responses = new LinkedList<Message>();
    for (Message m : all) {
      if (ParserType.HTTP_RESPONSE == m.type) {
        responses.add(m);
      }
    }
    for (Message m : responses) {
      test_message(m);
    }
    
    for (int i = 0; i!= responses.size(); ++i) {
      if (!responses.get(i).should_keep_alive) continue;
      for (int j = 0; j!=responses.size(); ++j) {
        if (!responses.get(j).should_keep_alive) continue;
        for (int k = 0; k!= responses.size(); ++k) {
          test_multiple3(responses.get(i), responses.get(j), responses.get(k));
        }
      }
    }

  // not sure what test_message_count_body does that test_message doesn't...
  //   Message m = find(responses, "404 no headers no body");
  //   test_message_count_body(m);
  //           m = find(responses, "200 trailing space on chunked body");
  //   test_message_count_body(m);

  // TODO test very large chunked response  

  // test_scan is more or less the same as test_permutations, will implement later...
  }

  


}

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.8.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.7.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.3 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.3-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.2-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.2 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.1-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1.1 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
midori_http_parser-0.6.1 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.6.0-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.6.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.6.0.beta.2-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java
http_parser.rb-0.6.0.beta.2 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/Responses.java