File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
grails-web/src/main/groovy/org/codehaus/groovy/grails/web/util Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,14 @@ public void setLocale(Locale locale) {
9292
9393 @ Override
9494 public void sendError (int i , String s ) throws IOException {
95+ if (isCommitted ()) throw new IllegalStateException ("Response already committed" );
9596 setStatus (i );
9697 flushBuffer ();
9798 }
9899
99100 @ Override
100101 public void sendError (int i ) throws IOException {
102+ if (isCommitted ()) throw new IllegalStateException ("Response already committed" );
101103 setStatus (i );
102104 flushBuffer ();
103105 }
@@ -159,4 +161,36 @@ public Object getContent(String encoding) throws CharacterCodingException {
159161
160162 return "" ;
161163 }
164+
165+ @ Override
166+ public void resetBuffer () {
167+ if (isCommitted ()) throw new IllegalStateException ("Response already committed" );
168+ if (usingWriter ) {
169+ charBuffer .reset ();
170+ }
171+
172+ if (usingStream ) {
173+ byteBuffer .reset ();
174+ }
175+ }
176+
177+ @ Override
178+ public void reset () {
179+ resetBuffer ();
180+ }
181+
182+ @ Override
183+ public void setContentLength (int len ) {
184+ // do nothing
185+ }
186+
187+ @ Override
188+ public void setStatus (int sc , String sm ) {
189+ setStatus (sc );
190+ }
191+
192+ @ Override
193+ public void flushBuffer () {
194+ // do nothing
195+ }
162196}
You can’t perform that action at this time.
0 commit comments