Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !977

Open
Created Oct 31, 2019 by Julien Muchembled@jmOwner
  • Report abuse
Report abuse

WIP: on replacing RESPONSE.write + raise

  • Overview 7
  • Commits 1
  • Changes 3

Besides the issue that was fixed in 2617d934, the commit in this MR is about other similar cases, but it seems they don't even work well with Medusa. In addition to the error message following the returned data when using WSGI, I think there are other things to clarify:

  • status code: I guess we always get 500 here, but that does not look correct and we should set status with lock, like in erp5_hal_json_style's Base_redirect
  • error log: shouldn't we avoid filling the error log (and waste time generating a error page), which is doable by raising Redirect (which anyway imply to set status explicitly, since a redirect status is clearly wrong)
  • content type: generating an error page via the error hook (standard_error_message) usually overrides the content type with text/html, which can be another to reason to raise Redirect (waiting for something better)

Note that this MR is only to decide the behaviour we want, and for the moment we'd use workarounds to do that. Proper implementation will be done in a separate MR.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: wsgi_backport_setbody_lock
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7