Patrick Rein uploaded a new version of WebClient-Help to project The Trunk: http://source.squeak.org/trunk/WebClient-Help-pre.14.mcz
==================== Summary ====================
Name: WebClient-Help-pre.14 Author: pre Time: 9 June 2023, 4:55:32.241055 pm UUID: 35b81cd9-5803-2e42-a541-1c4c60c7baf5 Ancestors: WebClient-Help-tpr.13
Fixes incorrect web server error handling documentation (#24 in the bug tracker).
=============== Diff against WebClient-Help-tpr.13 ===============
Item was changed: ----- Method: WebServerHelp class>>errorHandling (in category 'pages') ----- errorHandling "This method was automatically generated. Edit it using:" "WebServerHelp edit: #errorHandling" + <generated> + ^(HelpTopic - ^HelpTopic title: 'Error Handling' contents: 'By default WebServer will send a 500 response with a full debug stack when an error occurs. This may not be appropriate in production environments and consequently, the error handler can be customized. Typically, the error handler will perform one of the following actions:
* Pass the error through. This is useful for debugging, when an error in WebServer should raise a notifier:
+ webServer errorHandler: [:err :request | err pass]. - webServer errorHandler:[:err :socket| err pass].
* Send the ''standard'' 500 response (including the full stack): You can simply use WebServer''s default action for this:
+ webServer errorHandler: [:err :request | webServer handleError: err request: request.]. - webServer errorHandler:[:err :socket| webServer handleError: err socket: socket.].
* Send a custom 500 response, or perform a redirect, for example:
+ webServer errorHandler: [:err :request | + [request send302Response: ''/error.html''] + on: Error + do: ["Ignore errors in error handling"] ]. - webServer errorHandler:[:err :socket| - [socket sendData: - ''HTTP/1.0 302 Temporary redirect'', String crlf, - ''Location: /error.html'', String crlf, - String crlf. - socket close] on: Error do:[ - "Ignore errors in error handling" - ]. - ].
Of course, you can use any possible combination; including the ability to turn error handling on and off via WebServer http requests.!! + ]style[(395 14 2 3 1 9 1 1 3 1 4 135 14 2 3 9 1 1 11 12 1 3 1 8 1 7 83 14 2 3 1 9 5 38 1 5 3 11 4 1 33 1 138),c000000118,,c000000118,,c000000118,cgray;,,c000000118,,c000000118,,c000000118,,c000000118,,c000000118,cgray;,,c000000118,,c000000118,,c000000118,,c000000118,,c000000118,,c000000118,,c000000118,cgray;,,c000118000,,c000000118,,c000000118,c000118000,,c000118000,!!' readStream nextChunkText) + key: #errorHandling; + shouldStyle: false; + yourself! - ]style[(384 11 13 2 3 2 6 1 1 3 1 4 2 123 10 13 2 3 2 6 1 11 12 1 3 1 7 1 6 3 69 11 13 2 3 2 6 1 3 1 6 1 9 4 33 1 8 5 4 23 1 8 5 11 4 4 6 1 5 1 1 3 7 3 1 4 33 3 1 5 135),cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cgray;,cblack;,c000000126,cblack;,c000000126,cblack;,,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cgray;,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cblack;,,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cgray;,cblack;,c000126000,c000000126,cblack;,c000000126,cblack;,c126000126,c000000126,cblack;,c000000126,cblack;,c126000126,c000000126,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,cblack;,c000000126,c000126000,cblack;,c000000126,cblack;,c000000126,c000126000,cblack;,c000126126,cblack;,c000126000,cblack;,!!' readStream nextChunkText!
squeak-dev@lists.squeakfoundation.org