Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix handling of :redirect-after-html-post in 'process-post' #2

Closed
tmciver opened this Issue Jan 29, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Owner

tmciver commented Jan 29, 2013

The handling of :redirect-after-html-post in 'process-post' depends on util/optimal-media-type which determines the optimal media the client wants and considers the media types supplied by the resource. This fails for resources that support only a POST because they supply no media types. Fix should consider only the media types accepted by the client via the 'Accept' header and not what the resource supplies.

@tmciver tmciver closed this Jan 29, 2013

Owner

tmciver commented Jan 29, 2013

Created function util/accepts-html? which takes the ring request as argument and returns truthy if the request will accept HTML content. Using this function rather than util/optimal-media-type to determine if a redirect is required.

@tmciver tmciver added a commit that referenced this issue Jan 29, 2013

@tmciver tmciver Fix for github issue #2. ae8b018

@tmciver tmciver added a commit that referenced this issue Jan 29, 2013

@tmciver tmciver Fixed github issue #2: if return value of post function call is a res…
…ponse,

return it, otherwise go on to do the check for a redirect as before.
cb75628
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment