Closed cgarciae closed 8 years ago
@luizmineo
Tried digging in the source code to fix the problem. My hypothesis is that the shelf.Response
modified in the route is not being used because if the response of a route is NOT a shelf.Response
a new shelf.Response
is created using the output value from the route's function, but doesn't carry the headers set during the routes execution.
Redstone is a little hard to understand since I don't know shelf
. Looked for a while at server_impl
but couldn't find the actual line where the route's function is executed. I'll need a basic intro to start contributing with actual code.
This is the expected behavior. Shelf messages (request and response) are immutable, and the change()
method always creates a new instance.
v0.6 has a better library layout, which are easier to understand. I suggest that you explore this version instead of the current code base.
I've been trying to do a basic test with cookies with no luck. Here is my code
The browser doesn't receive the Set-Cookie header. However, it works if you return a
shelf.Response
with its headers set