Mercurial Hosting > luan
comparison src/luan/webserver/RequestParser.java @ 1256:c147e2e877e3
allow subclassing of HttpServicer
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 19 Sep 2018 20:15:16 -0600 |
parents | 275d1b52dbce |
children | e4d7a3114fa8 |
comparison
equal
deleted
inserted
replaced
1255:4f571a974132 | 1256:c147e2e877e3 |
---|---|
172 while( parser.noneOf("=;") ); | 172 while( parser.noneOf("=;") ); |
173 String name = urlDecode( parser.textFrom(start) ); | 173 String name = urlDecode( parser.textFrom(start) ); |
174 if( parser.match('=') ) { | 174 if( parser.match('=') ) { |
175 start = parser.currentIndex(); | 175 start = parser.currentIndex(); |
176 while( parser.noneOf(";") ); | 176 while( parser.noneOf(";") ); |
177 String value = urlDecode( parser.textFrom(start) ); | 177 String value = parser.textFrom(start); |
178 int len = value.length(); | |
179 if( value.charAt(0)=='"' && value.charAt(len-1)=='"' ) | |
180 value = value.substring(1,len-1); | |
181 value = urlDecode(value); | |
178 request.cookies.put(name,value); | 182 request.cookies.put(name,value); |
179 } | 183 } |
180 if( parser.endOfInput() ) | 184 if( parser.endOfInput() ) |
181 return; | 185 return; |
182 require( parser.match(';') ); | 186 require( parser.match(';') ); |