Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-12621

Basic Ajax/XHR kernel support

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Obsolete
    • Icon: Medium Medium
    • Future
    • 4.0.0, 4.0.2, 4.1.0alpha2
    • Misc
    • None

    Description

      This is a patch to add Ajax support to the kernel, the point of this is to avoid storing LastAccessesURI and LastAccessedModifyingURI sessions when the request is identified as a xhr / ajax type.

      This is done by adding 4 new functions to eZHTTPTool:

      • getXhrType()
        identifies the request based on de facto(used in all major Ajax/JavaScript libraries) http header ('X-Requested-With'), but also looks for this parameter in get and post variables.
        If it is not found or not equal to 'xmlhttprequest', it returns false.
        supported types: 'xhr', 'post', 'get' or false
      • setXhrType()
        Lets you explicit set the type, useful if you want to override this from extension
      • getXhrResponseType()
        Looks up the http 'Accept' header to get the preferred response type, not currently used in the kernel but will be useful for extensions. In the future it can be used to let the kernel be context aware so debug and error codes are in correct format.
        Also supports setting the accept value in post or get parameter as 'http_accept'.
        supported types: text, json, xml and xhtml
      • setXhrResponseType()
        Lets you explicit set the preferred response type.

      Attachments

        Activity

          People

            unknown unknown
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: