Pr/bugfix test request headers #527

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@veryrusty
Member

veryrusty commented Feb 13, 2014

Build request cookie objects from request->headers, rather than request->env.

As the request object is built, headers from the env are added to request->headers, however cookies were still being populated from the env.

When testing you may need to pass in extra headers into the request. Dancer2::Test allows for this updating the headers in the request, but any extra cookies were only accessible via request->header, not request->cookies.

veryrusty added some commits Feb 13, 2014

Add tests for including an arrayref of headers to dancer_response
Ensuring there are tests to match the documentation. Note that extra
cookie headers are currently not being included in the request object cookies
hash. Ref #500.
Build request cookie objects from request->headers, rather than reque…
…st->env.

As the request object is built, headers from the env are added to the headers
object, however cookies were still being populated from the env. However, when
testing you may need to pass in extra headers in the request. Dancer2::Test
allows for this, updating the headers in the request, but any extra cookies
were only accessible via request->header, not request->cookies.

Building the cookie objects from request->headers resolves this and closes #500.
@veryrusty

This comment has been minimized.

Show comment Hide comment
@veryrusty

veryrusty Mar 29, 2014

Member

Labelling as "Standby" until #545 is resolved.

Member

veryrusty commented Mar 29, 2014

Labelling as "Standby" until #545 is resolved.

@xsawyerx

This comment has been minimized.

Show comment Hide comment
@xsawyerx

xsawyerx Mar 29, 2014

Member

Once I finish the work (only jerk redirect.t is waiting), I'll add these changes to my branch.

Member

xsawyerx commented Mar 29, 2014

Once I finish the work (only jerk redirect.t is waiting), I'll add these changes to my branch.

@veryrusty veryrusty added this to the 0.13 milestone Apr 10, 2014

@xsawyerx

This comment has been minimized.

Show comment Hide comment
@xsawyerx

xsawyerx Apr 24, 2014

Member

Merged! Thanks. :)

Member

xsawyerx commented Apr 24, 2014

Merged! Thanks. :)

@xsawyerx xsawyerx closed this Apr 24, 2014

@veryrusty veryrusty deleted the pr/bugfix_test_request_headers branch Aug 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment