title: Using feign with ribbon on spring boot cannot parse header
body: <p>I am doing some test with ribbon and feign to connect to an api. 
  The api is running using spring boot:</p>
  
  <pre><code>@Controller
  @EnableAutoConfiguration
  public class MovieService {
  
      @RequestMapping("/")
      @ResponseBody
      List&lt;String&gt; findAllMovies() {
          System.out.println("finding all movies");
          return Arrays.asList("start wars", "inception", "the martian");
      }
  
      public static void main(String[] args) throws Exception {
          SpringApplication.run(MovieService.class, args);
      }
  }
  </code></pre>
  
  <p>This is my client code using:
  the feign interface:</p>
  
  <pre><code>public interface MovieService {
  
      @RequestLine("GET /")
      List&lt;String&gt; findAllMovies();
  
  }
  </code></pre>
  
  <p>When i use feign alone everything works:</p>
  
  <pre><code>public class MovieClient {
  
      public static void main(String args[]) {
          MovieService movieService = Feign.builder()
                  .decoder(new GsonDecoder())
                  .target(MovieService.class, "http://localhost:8080");
          System.out.println(movieService.findAllMovies());
  
      }
  
  }
  </code></pre>
  
  <p>But when i also use ribbon:</p>
  
  <pre><code>public class MovieClient {
  
      public static void main(String args[]) {
          ConfigurationManager.getConfigInstance().setProperty("MovieService.ribbon." + CommonClientConfigKey.MaxAutoRetriesNextServer, "3");
          ConfigurationManager.getConfigInstance().setProperty("MovieService.ribbon." + CommonClientConfigKey.ListOfServers, "localhost:8080");
  
          MovieService movieService = Feign.builder().client(RibbonClient.create()).target(MovieService.class, "https://MovieService");
          System.out.println(movieService.findAllMovies());
      }
  
  }
  </code></pre>
  
  <p>I get the following error in the spring boot server logging:</p>
  
  <pre><code>2016-01-06 21:26:50.670  INFO 61353 --- [nio-8080-exec-1] o.a.coyote.http11.Http11NioProcessor     : Error parsing HTTP request header
   Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
  
  java.lang.ArrayIndexOutOfBoundsException: -64
      at org.apache.coyote.http11.AbstractNioInputBuffer.parseHeader(AbstractNioInputBuffer.java:474) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
      at org.apache.coyote.http11.AbstractNioInputBuffer.parseHeaders(AbstractNioInputBuffer.java:381) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1025) ~[tomcat-embed-core-8.0.30.jar:8.0.30]
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) [tomcat-embed-core-8.0.30.jar:8.0.30]
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-embed-core-8.0.30.jar:8.0.30]
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-embed-core-8.0.30.jar:8.0.30]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_05]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_05]
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.30.jar:8.0.30]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
  </code></pre>
  
  <p>It looks like i am receiving the following header in my spring boot app:</p>
  
  <pre><code>2016-01-06 21:43:52.606 DEBUG 61415 --- [nio-8080-exec-9] o.a.c.http11.InternalNioInputBuffer      : Received [ÏËV|jà^kgáxþæèðMn¨{oý²]Aì7FÀ#À'&lt;À%À)g@À  À/ÀÀ32ÀÀÀÀÀ+À/À-À1¢ÀÀ
  ÿ\
  42  
  </code></pre>
  
  <p>Any idea what i'm doing wrong? Am i missing something?</p>