Project

General

Profile

Feature #783

Simplify Response object, and provide Redirect

Added by Elmer de Looff over 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Elmer de Looff
Category:
PageMaker
Target version:
Start date:
2012-04-20
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

The Response object currently accepts arguments to set headers and cookies.

Cookies are more verbosely (and less error-prone) set on the request object, which the cookies set in the Response will be forwarded to regardless. Additionally, the headers argument is in practice only used for redirects, which are a bit of a burden to generate now.

The cookies argument should be dropped in favor of clients using the one true method of using the request object on the PageMaker instance.

Additionally, a new Redirect class should be introduced so that redirects can be easily created. This should accept location and httpcode arguments, the second of which defaults to 307 (temporary redirect). The Redirect class should subclass from response, and have a functional fallback for clients that fail to understand HTTP 307 (unlikely, but they may exist) in the form of a minimal html page.

Associated revisions

Revision 204:1407d286215b (diff)
Added by Elmer de Looff over 12 years ago

Removed the setting of cookies from the Response object and added a functional Redirect object. Example code added to the uweb_info project. This resolves #783.

Revision 337:5ced2e59e704 (diff)
Added by Elmer de Looff over 11 years ago

Added ROUTE_PREFIX variable to router file that defines a common prefix for all routes. This resolves #783.

History

#1 Updated by Elmer de Looff over 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 70

Applied in changeset 1407d286215b.

#2 Updated by Elmer de Looff over 12 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 70 to 100

Also available in: Atom PDF