From 0003b737bd66c330b87af3ff0b37561c2084cb31 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 4 Apr 2013 07:38:47 -0600 Subject: [PATCH] Doctrinal purity --- collects/web-server/dispatchers/dispatch-files.rkt | 2 +- collects/web-server/http/request.rkt | 2 +- collects/web-server/scribblings/http.scrbl | 4 ++-- collects/web-server/scribblings/tutorial/continue.scrbl | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/collects/web-server/dispatchers/dispatch-files.rkt b/collects/web-server/dispatchers/dispatch-files.rkt index 0e6f2ce8b9..4f8b92d0fa 100644 --- a/collects/web-server/dispatchers/dispatch-files.rkt +++ b/collects/web-server/dispatchers/dispatch-files.rkt @@ -76,7 +76,7 @@ [range-delimiter-regexp #px#","] [range-regexp #px#"^([0-9]*)-([0-9]*)$"] [range-error (lambda (header) - (display (format "Bad Range header: ~s. File a Racket bug report!\n" + (display (format "Bad Range header: ~s. File a Racket problem report!\n" (header-value header)) (current-error-port)) #f)]) diff --git a/collects/web-server/http/request.rkt b/collects/web-server/http/request.rkt index fee9d928a9..7edc3464a8 100644 --- a/collects/web-server/http/request.rkt +++ b/collects/web-server/http/request.rkt @@ -134,7 +134,7 @@ ;; msie-from-local-machine? : table str str -> bool -;; to work around a bug in MSIE for documents < 265 bytes when +;; to work around an error in MSIE for documents < 265 bytes when ;; connecting from the local machine. The server could pad the ;; response as MSIIS does, but closing the connection works, too. We ;; do not check for version numbers since IE 6 under windows is 5.2 diff --git a/collects/web-server/scribblings/http.scrbl b/collects/web-server/scribblings/http.scrbl index 92cad80056..9f36519bcd 100644 --- a/collects/web-server/scribblings/http.scrbl +++ b/collects/web-server/scribblings/http.scrbl @@ -105,9 +105,9 @@ Here is an example typical of what you will find in many applications: @defmodule[web-server/http/bindings]{ -These functions, while convenient, could introduce subtle bugs into your +These functions, while convenient, could introduce subtle errors into your application. Examples: that they are case-insensitive could introduce -a bug; if the data submitted is not in UTF-8 format, then the conversion +an error; if the data submitted is not in UTF-8 format, then the conversion to a string will fail; if an attacker submits a form field as if it were a file, when it is not, then the @racket[request-bindings] will hold a @racket[bytes?] object and your program will error; and, for file uploads diff --git a/collects/web-server/scribblings/tutorial/continue.scrbl b/collects/web-server/scribblings/tutorial/continue.scrbl index d327364d40..b596faa64f 100644 --- a/collects/web-server/scribblings/tutorial/continue.scrbl +++ b/collects/web-server/scribblings/tutorial/continue.scrbl @@ -699,7 +699,7 @@ Improve the presentation of the blog web application by writing an external style sheet that suits your tastes. Adjust all of the HTML response handlers to include a link to the style sheet. -@section{The Double Submit Bug} +@section{The Double Submit Error} @declare-exporting[#:use-sources (web-server/scribblings/tutorial/examples/iteration-7 web-server/servlet)] @@ -735,12 +735,12 @@ below? @external-file["use-redirect.rkt"] -So the double-submit bug is easy to prevent: whenever you have +So the double-submit error is easy to prevent: whenever you have handlers that mutate the state of the system, use @racket[redirect/get] when sending back your response. @bold{Exercise.} -Use @racket[redirect/get] to fix the double-submit bug in the blog +Use @racket[redirect/get] to fix the double-submit error in the blog application. With these minor fixes, our blog application now looks like this: