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

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

    XMLWordPrintable

Details

    • 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; } });
    • ---
    • ---

    Description

      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".

      Attachments

        Issue Links

          Activity

            People

              pberan@redhat.com Petr Beran
              synth3 Anton S
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: