Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2860

resteasy-vertx: Response Headers with String value of same type are overwritten

XMLWordPrintable

    • Workaround Exists
    • Hide

      Add a "HeaderDelegate" for String values to the "ProviderFactory" of "VertxResteasyDeployment":

       

      deployment.getProviderFactory().addHeaderDelegate(String.class, new HeaderDelegate<String>()
              {
                  @Override
                  public String fromString(String value)
                  {
                      return value;
                  }            @Override
                  public String toString(String value)
                  {
                      return value;
                  }
              });
      
      Show
      Add a "HeaderDelegate" for String values to the "ProviderFactory" of "VertxResteasyDeployment":   deployment.getProviderFactory().addHeaderDelegate( String .class, new HeaderDelegate< String >() { @Override public String fromString( String value) { return value; } @Override public String toString( String value) { return value; } });
    • Undefined

      When there are (e.g.) multiple SetCookie headers in an HttpResponse with String-Values then only one of them will make it to the actual vertx response as the headers overwrite each other. 

       

      The cause may be found here:

      VertxHttpResponse.java#L149

      Where "set" is used instead of "add".

            pberan@redhat.com Petr Beran
            synth3 Andy S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: