Mercurial Hosting > luan
comparison web/src/luan/modules/web/HttpServicer.java @ 377:a8d03e6882c6
add web/NotFound.java
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 19 Apr 2015 07:27:23 -0600 |
parents | 9dbf3433f70f |
children | 3e68917a0dc6 |
comparison
equal
deleted
inserted
replaced
376:0a75ed73bccc | 377:a8d03e6882c6 |
---|---|
316 } | 316 } |
317 } ); | 317 } ); |
318 add( tbl, "text_writer" ); | 318 add( tbl, "text_writer" ); |
319 add( tbl, "set_cookie", String.class, String.class, Boolean.TYPE, String.class ); | 319 add( tbl, "set_cookie", String.class, String.class, Boolean.TYPE, String.class ); |
320 add( tbl, "remove_cookie", String.class, String.class ); | 320 add( tbl, "remove_cookie", String.class, String.class ); |
321 tbl.put( "status", new LuanProperty() { | |
322 @Override public Object get() { | |
323 return response.getStatus(); | |
324 } | |
325 @Override public boolean set(Object value) { | |
326 Integer i = Luan.asInteger(value); | |
327 if( i==null ) | |
328 throw new IllegalArgumentException("value must be an integer"); | |
329 response.setStatus(i); | |
330 return true; | |
331 } | |
332 } ); | |
321 return tbl; | 333 return tbl; |
322 } | 334 } |
323 | 335 |
324 private LuanTable sessionTable() throws NoSuchMethodException { | 336 private LuanTable sessionTable() throws NoSuchMethodException { |
325 LuanTable tbl = Luan.newTable(); | 337 LuanTable tbl = Luan.newTable(); |