tyrus
  1. tyrus
  2. TYRUS-207

ClientEndpointConfig.Configurator#beforeRequest passes only first value of list<String> in headers to server endpoint

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      public class ClientConfigurator extends Configurator {
      	@Override
      	public void beforeRequest(Map<String, List<String>> headers) {
                headers.put("aKey", Arrays.asList("header1", "header2", "header3");
              }
      }
      @ServerEndpoint(value = "/echo", configurator = EchoConfigurator.class)
      public class WSCEchoServer {
      ...
      }
      public class EchoConfigurator extends Configurator {
      	@Override
      	public void modifyHandshake(ServerEndpointConfig sec,
      			HandshakeRequest request, HandshakeResponse response) {
      		Map<String, List<String>> map = request.getHeaders();
      		response.getHeaders().putAll(map);
                      //map contains only pair [key,firstValue]=["aKey","header1"]
      	}
      }
      

        Activity

        jan.supol created issue -
        Pavel Bucek made changes -
        Field Original Value New Value
        Assignee Pavel Bucek [ pavel_bucek ]
        Pavel Bucek made changes -
        Fix Version/s 1.2 [ 16550 ]
        Pavel Bucek made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: