• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

3.9 Custom Error Pages
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog HTTP support
        • The HTTP server libraries
          • Custom Error Pages
            • status_page_hook/3
http:status_page_hook(+StatusCode, +Key, -CustomHTML)
StatusCode is the page status code (such as 401), Key is the third argument of the http_reply exception which was thrown, and CustomHTML is a list of HTML tokens. The default page for 401 is generated via this code:
        phrase(page([ title('401 Authorization Required')
                    ],
                    [ h1('Authorization Required'),
                      p(['This server could not verify that you ',
                         'are authorized to access the document ',
                         'requested.  Either you supplied the wrong ',
                         'credentials (e.g., bad password), or your ',
                         'browser doesn\'t understand how to supply ',
                         'the credentials required.'
                        ]),
                      \address
                    ]),
               CustomHTML).

ClioPatria (version V3.0.0-338-gc91dba5-DIRTY)