comparison src/luan/modules/http/Http.luan @ 1559:153ea3b7afaf

Http - minor
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 22 Oct 2020 00:25:40 -0600
parents 2b4471d310b3
children c922446f53aa
comparison
equal deleted inserted replaced
1558:fe5bcd8133e0 1559:153ea3b7afaf
134 attributes["Max-Age"] = "0" 134 attributes["Max-Age"] = "0"
135 this.set_cookie(name,"delete",attributes) 135 this.set_cookie(name,"delete",attributes)
136 end 136 end
137 137
138 function this.text_writer() 138 function this.text_writer()
139 this.writer and "writer already set" 139 this.writer and error "writer already set"
140 this.writer = ResponseOutputStream.new(this.java) 140 this.writer = ResponseOutputStream.new(this.java)
141 this.writer = OutputStreamWriter.new(this.writer) 141 this.writer = OutputStreamWriter.new(this.writer)
142 return Boot.text_writer(this.writer) 142 return Boot.text_writer(this.writer)
143 end 143 end
144 144
145 function this.binary_writer() 145 function this.binary_writer()
146 this.writer and "writer already set" 146 this.writer and error "writer already set"
147 this.writer = ResponseOutputStream.new(this.java) 147 this.writer = ResponseOutputStream.new(this.java)
148 return Boot.binary_writer(this.writer) 148 return Boot.binary_writer(this.writer)
149 end 149 end
150 150
151 return this 151 return this