swagger-api / swagger-socket

Swagger Socket: A REST over WebSocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The headers building code in Response is inconsistent

elakito opened this issue · comments

Currently, SwaggerSocketProtocolInterceptor creates a Response by adding headers as
Map<String, String> headers = res.headers();
for (String s : headers.keySet()) {
builder.header(new Header(s, headers.get(s)));
}

But the Response itself does not use the headers (not read from the builder when it is instantiated).

So there is an inconsistency in the code. I don't think including the above response headers in the swagger-socket response makes sense. But it probably makes sense to include some headers in the response. (e.g., Content-Type). We could also add an option to not include any headers.

this depends on
Atmosphere/atmosphere#1846
namely, atmosphere-2.2.5.