Mercurial Hosting > luan
comparison web/src/luan/modules/web/HttpServicer.java @ 486:b92fc7ec7f51
add Http.request.scheme and Http.request.is_secure
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 May 2015 22:08:49 -0600 |
parents | 44caaa6a3d92 |
children |
comparison
equal
deleted
inserted
replaced
485:c7acb40c6ca9 | 486:b92fc7ec7f51 |
---|---|
169 getters.rawPut( "remote_address", new LuanJavaFunction( | 169 getters.rawPut( "remote_address", new LuanJavaFunction( |
170 HttpServletRequest.class.getMethod( "getRemoteAddr" ), request | 170 HttpServletRequest.class.getMethod( "getRemoteAddr" ), request |
171 ) ); | 171 ) ); |
172 getters.rawPut( "protocol", new LuanJavaFunction( | 172 getters.rawPut( "protocol", new LuanJavaFunction( |
173 HttpServletRequest.class.getMethod( "getProtocol" ), request | 173 HttpServletRequest.class.getMethod( "getProtocol" ), request |
174 ) ); | |
175 getters.rawPut( "scheme", new LuanJavaFunction( | |
176 HttpServletRequest.class.getMethod( "getScheme" ), request | |
177 ) ); | |
178 getters.rawPut( "is_secure", new LuanJavaFunction( | |
179 HttpServletRequest.class.getMethod( "isSecure" ), request | |
174 ) ); | 180 ) ); |
175 LuanTable cookies = new LuanMeta() { | 181 LuanTable cookies = new LuanMeta() { |
176 | 182 |
177 @Override public Object __index(LuanState luan,LuanTable tbl,Object key) { | 183 @Override public Object __index(LuanState luan,LuanTable tbl,Object key) { |
178 if( !(key instanceof String) ) | 184 if( !(key instanceof String) ) |